Commit 2300e2b7 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

increase the size of the swap file in chunks of 16MB instead of only

2005-07-30  Sven Neumann  <sven@gimp.org>

	* app/base/tile-swap.c: increase the size of the swap file in
	chunks of 16MB instead of only 256KB. Check the return value of
	ftruncate().
parent 5071edb1
2005-07-30 Sven Neumann <sven@gimp.org>
* app/base/tile-swap.c: increase the size of the swap file in
chunks of 16MB instead of only 256KB. Check the return value of
ftruncate().
2005-07-29 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimppageselector.c: increased spacing.
......
......@@ -18,7 +18,9 @@ Changes in GIMP 2.3.3
- prepared code and UI for more layer lock types
- added GimpResolution entry widget
- added new PDF import plug-in based on libpoppler
- improved palette editor
- undeprecated and improved palette editor
- show more information in the Image Properties dialog
- added first prototype of SIOX foreground selection tool
Changes in GIMP 2.3.2
......
......@@ -132,7 +132,8 @@ static GHashTable * swap_files = NULL;
static GList * open_swap_files = NULL;
static gint nopen_swap_files = 0;
static gint next_swap_num = 1;
static off_t swap_file_grow = 16 * TILE_WIDTH * TILE_HEIGHT * 4;
static const off_t swap_file_grow = 1024 * TILE_WIDTH * TILE_HEIGHT * 4;
#ifdef ENABLE_THREADED_TILE_SWAPPER
static GStaticMutex swapfile_mutex = G_STATIC_MUTEX_INIT;
......@@ -817,7 +818,11 @@ tile_swap_resize (DefSwapFile *def_swap_file,
{
if (def_swap_file->swap_file_end > new_size)
{
ftruncate (fd, new_size);
if (ftruncate (fd, new_size) != 0)
{
g_message ("Failed to resize swap file: %s", g_strerror (errno));
return;
}
}
def_swap_file->swap_file_end = new_size;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment