|
|
Defines | |
| #define | gx_globalrealloc_dbg(buf, sbuf, f, l) gx_globalrealloc(buf,sbuf) |
| Release/Debug workaround. | |
| #define | gx_globalalloc_dbg(buf, sbuf, f, l) gx_globalalloc(buf,sbuf) |
| Release/Debug workaround. | |
Functions | |
| int | gx_globalrealloc (void **buffer, int sbuffer) |
| Reallocates or frees a previously allocated memory area or allocates a new area. | |
| int | gx_globalalloc (void **buffer, int sbuffer) |
| Allocates a memory area that can be passed between modules. | |
| int | gx_globalfree (void *buffer) |
| Frees a previously allocated memory area. | |
| int | gx_globalsize (int *sbuffer, void *buffer) |
| Gets the size of a previously allocated memory area in bytes. | |
| int | gx_globalrealloc_dbg (void **buffer, int sbuffer, const char *file, int line) |
| Reallocates or frees a previously allocated memory area or allocates a new area (Debug version). | |
| int | gx_globalalloc_dbg (void **buffer, int sbuffer, const char *file, int line) |
| Allocates a memory area that can be passed between modules (Debug version). | |
| int | gx_globalcheck_dbg () |
| Checks the memory consistency previously allocated with the gx_globalalloc() or gx_globalrealloc() functions (Debug version). | |
| int | gx_globaltestmem_dbg (int index, char *fnbuffer, int fnbsize, char *membuffer, int mbsize, int *line, int *size, void **address) |
| Returns details about the unfreed memory previously allocated with the gx_globalalloc() or gx_globalrealloc() functions (Debug version). | |
| int | gx_creatememslot (int *handle, void **mem) |
| Allocates a memory slot and returns a handle to it. | |
| int | gx_getmemslot (int handle, void **mem) |
| Returns the memory pointer to use on data update. | |
| int | gx_unrefmemslot (int handle) |
| Decrements the memory slot's reference counter. | |
| #define gx_globalrealloc_dbg | ( | buf, | |||
| sbuf, | |||||
| f, | |||||
| l | ) | gx_globalrealloc(buf,sbuf) |
| #define gx_globalalloc_dbg | ( | buf, | |||
| sbuf, | |||||
| f, | |||||
| l | ) | gx_globalalloc(buf,sbuf) |
Release/Debug workaround.
| int gx_globalrealloc | ( | void ** | buffer, | |
| int | sbuffer | |||
| ) | [inline] |
Reallocates or frees a previously allocated memory area or allocates a new area.
| buffer | Pointer to a memory area pointer where the function receives the address of a previously allocated memory area and where it writes the address of the reallocated area. This function is also suitable for allocation if the value of *buffer is zero. If sbuffer is zero the function frees the specified memory area. | |
| sbuffer | Size of the new memory area in bytes. If it is zero it frees the area. |
References gx_call().
Referenced by gx_globalalloc(), and gx_globalfree().
| int gx_globalalloc | ( | void ** | buffer, | |
| int | sbuffer | |||
| ) | [inline] |
Allocates a memory area that can be passed between modules.
| buffer | Pointer to a memory area pointer where the function writes the address of the newly allocated area. If the original value of the pointer was non-zero the memory area will be lost after the allocation. | |
| sbuffer | Size of the memory area to allocate. |
References gx_globalrealloc().
Referenced by gxVariant::GetASCII(), gxZip::GetComment(), gxZip::GetCommentA(), gxZip::GetFileComment(), gxZip::GetFileCommentA(), gxZip::GetFileName(), gxZip::GetFileNameA(), and gxVariant::GetUnicode().
| int gx_globalfree | ( | void * | buffer | ) | [inline] |
Frees a previously allocated memory area.
| buffer | Pointer to a memory area. |
References gx_globalrealloc().
Referenced by gxVariant::GetASCII(), gxZip::GetComment(), gxZip::GetCommentA(), gxZip::GetFileComment(), gxZip::GetFileCommentA(), gxZip::GetFileName(), gxZip::GetFileNameA(), and gxVariant::GetUnicode().
| int gx_globalsize | ( | int * | sbuffer, | |
| void * | buffer | |||
| ) | [inline] |
Gets the size of a previously allocated memory area in bytes.
| sbuffer | Pointer where the function writes the size of the area. | |
| buffer | Pointer to the memory area. |
References gx_call().
| int gx_globalrealloc_dbg | ( | void ** | buffer, | |
| int | sbuffer, | |||
| const char * | file, | |||
| int | line | |||
| ) | [inline] |
Reallocates or frees a previously allocated memory area or allocates a new area (Debug version).
| buffer | Pointer to a memory area pointer where the function receives the address of a previously allocated memory area and where it writes the address of the reallocated area. This function is also suitable for allocation if the value of *buffer is zero. If sbuffer is zero the function frees the specified memory area. | |
| sbuffer | Size of the new memory area in bytes. If it is zero it frees the area. | |
| file | File name. | |
| line | Line number. |
References gx_call().
| int gx_globalalloc_dbg | ( | void ** | buffer, | |
| int | sbuffer, | |||
| const char * | file, | |||
| int | line | |||
| ) | [inline] |
Allocates a memory area that can be passed between modules (Debug version).
| buffer | Pointer to a memory area pointer where the function writes the address of the newly allocated area. If the original value of the pointer was non-zero the memory area will be lost after the allocation. | |
| sbuffer | Size of the memory area to allocate. | |
| file | File name. | |
| line | Line number. |
References gx_globalrealloc_dbg.
| int gx_globalcheck_dbg | ( | ) | [inline] |
Checks the memory consistency previously allocated with the gx_globalalloc() or gx_globalrealloc() functions (Debug version).
References gx_call().
| int gx_globaltestmem_dbg | ( | int | index, | |
| char * | fnbuffer, | |||
| int | fnbsize, | |||
| char * | membuffer, | |||
| int | mbsize, | |||
| int * | line, | |||
| int * | size, | |||
| void ** | address | |||
| ) | [inline] |
Returns details about the unfreed memory previously allocated with the gx_globalalloc() or gx_globalrealloc() functions (Debug version).
| index | The index of the allocated memory (global). | |
| fnbuffer | Preallocated buffer for returning the file name where the allocation happened. | |
| fnbsize | The size of the preallocated file name buffer. | |
| membuffer | Preallocated buffer for returning the memory content (human readable format). | |
| mbsize | The size of the preallocated memory content buffer. | |
| line | The line number where the allocation happened. | |
| size | The size of the allocated memory area. | |
| address | Pointer for returning the allocate memory address. |
References gx_call().
| int gx_creatememslot | ( | int * | handle, | |
| void ** | mem | |||
| ) | [inline] |
Allocates a memory slot and returns a handle to it.
| handle | Preallocated buffer for the result. | |
| mem | Preallocated buffer for getting the memslot address. |
References gx_call().
| int gx_getmemslot | ( | int | handle, | |
| void ** | mem | |||
| ) | [inline] |
Returns the memory pointer to use on data update.
| handle | The handle of the memslot. | |
| mem | Preallocated buffer for the result. |
References gx_call().
| int gx_unrefmemslot | ( | int | handle | ) | [inline] |
Decrements the memory slot's reference counter.
| handle | The handle of the memslot. |
References gx_call().