mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
- Tried to make it possible to have debug versions of the memory
management code in the default link library along with the normal versions. Let's see how well this works out in the GCC version. SAS/C does not seem to like it... git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14785 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: stdlib_malloc.c,v 1.2 2004-12-24 11:46:12 obarthel Exp $
|
||||
* $Id: stdlib_malloc.c,v 1.3 2004-12-24 18:31:38 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@ -44,6 +44,7 @@
|
||||
/****************************************************************************/
|
||||
|
||||
#undef malloc
|
||||
#undef __malloc
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
@ -206,7 +207,7 @@ __allocate_memory(size_t size,BOOL never_free,const char * UNUSED file,int UNUSE
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
void *
|
||||
__static void *
|
||||
__malloc(size_t size,const char * file,int line)
|
||||
{
|
||||
void * result = NULL;
|
||||
@ -249,6 +250,10 @@ __malloc(size_t size,const char * file,int line)
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#if NOT defined(__MEM_DEBUG)
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
void *
|
||||
malloc(size_t size)
|
||||
{
|
||||
@ -259,6 +264,11 @@ malloc(size_t size)
|
||||
return(result);
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#endif /* __MEM_DEBUG */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user