1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00

* libio/genops.c (_IO_unbuffer_write): Don't always free the

buffer.  This is not necessary except in debug mode.  If we don't
	free the buffer but the FILE structure to a list.
	(buffer_free): New function.  Free buffers or tell _IO_unbuffer_write
	to do so.
	* libio/libio.h (struct _IO_FILE): Add new members to keep track
	of which buffers have to be freed.
This commit is contained in:
Ulrich Drepper
2006-01-11 07:55:51 +00:00
parent 3370f2bd3d
commit 7876272372
3 changed files with 65 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 1991-1995,1997-2003,2004,2005 Free Software Foundation, Inc.
/* Copyright (C) 1991-1995,1997-2005,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Per Bothner <bothner@cygnus.com>.
@@ -317,13 +317,19 @@ struct _IO_FILE_complete
/* Wide character stream stuff. */
struct _IO_codecvt *_codecvt;
struct _IO_wide_data *_wide_data;
struct _IO_FILE *_freeres_list;
void *_freeres_buf;
size_t _freeres_size;
# else
void *__pad1;
void *__pad2;
void *__pad3;
void *__pad4;
size_t __pad5;
# endif
int _mode;
/* Make sure we don't get into trouble again. */
char _unused2[15 * sizeof (int) - 2 * sizeof (void *)];
char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
#endif
};