From 7876272372451b1cb0a7da9cfbbf9027550bccce Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 11 Jan 2006 07:55:51 +0000 Subject: * 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. --- libio/libio.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'libio/libio.h') diff --git a/libio/libio.h b/libio/libio.h index 21e70489cf..f6aed4fe00 100644 --- a/libio/libio.h +++ b/libio/libio.h @@ -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 . @@ -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 }; -- cgit 1.4.1