diff options
author | Danny Smith <dannysmith@users.sourceforge.net> | 2002-01-27 22:54:54 +0000 |
---|---|---|
committer | Danny Smith <dannysmith@users.sourceforge.net> | 2002-01-27 22:54:54 +0000 |
commit | 88a820dbcc75af61e495d87ffc047085e218515e (patch) | |
tree | 0577ce58967936fc06a03800026bb79d2ac3910b /winsup | |
parent | 0dbef4a1922a552f5670930e67013b3056813091 (diff) | |
download | newlib-88a820dbcc75af61e495d87ffc047085e218515e.zip newlib-88a820dbcc75af61e495d87ffc047085e218515e.tar.gz newlib-88a820dbcc75af61e495d87ffc047085e218515e.tar.bz2 |
* include/malloc.h (_heapinfo): Correct structure definition.
(_USEDENTRY,_FREEENTRY): Add defines.
Add comment on platform support for _heap* functions.
(_get_sbh_threshold): Add prototype.
(_set_sbh_threshold): Likewise.
(_expand): Likewise.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/mingw/ChangeLog | 9 | ||||
-rw-r--r-- | winsup/mingw/include/malloc.h | 19 |
2 files changed, 23 insertions, 5 deletions
diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog index 7d3eb7c..ed4487b 100644 --- a/winsup/mingw/ChangeLog +++ b/winsup/mingw/ChangeLog @@ -1,3 +1,12 @@ +2002-01-28 Danny Smith <dannysmith@users.sourceforge.net> + + * include/malloc.h (_heapinfo): Correct structure definition. + (_USEDENTRY,_FREEENTRY): Add defines. + Add comment on platform support for _heap* functions. + (_get_sbh_threshold): Add prototype. + (_set_sbh_threshold): Likewise. + (_expand): Likewise. + 2002-01-25 Danny Smith <dannysmith@users.sourceforge.net> * profile/profil.c: Update copyright info. diff --git a/winsup/mingw/include/malloc.h b/winsup/mingw/include/malloc.h index 85ad4e8..9c41240 100644 --- a/winsup/mingw/include/malloc.h +++ b/winsup/mingw/include/malloc.h @@ -41,20 +41,25 @@ /* * The structure used to walk through the heap with _heapwalk. - * TODO: This is a guess at the internals of this structure. */ typedef struct _heapinfo { - void* ptr; - unsigned int size; - int in_use; + int* _pentry; + size_t _size; + int _useflag; } _HEAPINFO; +/* Values for _heapinfo.useflag */ +#define _USEDENTRY 0 +#define _FREEENTRY 1 #ifdef __cplusplus extern "C" { #endif - +/* + The _heap* memory allocation functions are supported on NT + but not W9x. On latter, they always set errno to ENOSYS. +*/ int _heapwalk (_HEAPINFO*); #ifndef _NO_OLDNAMES @@ -64,7 +69,11 @@ int heapwalk (_HEAPINFO*); int _heapchk (void); /* Verify heap integrety. */ int _heapmin (void); /* Return unused heap to the OS. */ int _heapset (unsigned int); + size_t _msize (void*); +size_t _get_sbh_threshold (void); +int _set_sbh_threshold (size_t); +void * _expand (void*, size_t); #ifdef __cplusplus } |