- Moved the memory initialization and cleanup functions into the

malloc/free code itself and updated the alloca code to do its
  own data management.

- Finally optimized the alloca() memory cleanup code.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14784 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
Olaf Barthel
2004-12-24 11:46:12 +00:00
parent 3c9f119046
commit 73e6ccc14e
12 changed files with 189 additions and 148 deletions
+4 -38
View File
@@ -1,5 +1,5 @@
/*
* $Id: stdlib_data.c,v 1.3 2004-11-14 11:06:27 obarthel Exp $
* $Id: stdlib_data.c,v 1.4 2004-12-24 11:46:12 obarthel Exp $
*
* :ts=4
*
@@ -43,28 +43,6 @@
/****************************************************************************/
/* NOTE: for Knuth's algorithm below the seed must not be zero. */
unsigned __random_seed = 1;
/****************************************************************************/
#if defined(__USE_MEM_TREES) && defined(__MEM_DEBUG)
struct MemoryTree __memory_tree;
#endif /* __USE_MEM_TREES && __MEM_DEBUG */
/****************************************************************************/
APTR __memory_pool;
struct MinList __memory_list;
/****************************************************************************/
struct MinList __alloca_memory_list;
/****************************************************************************/
struct WBStartup * __WBenchMsg;
/****************************************************************************/
@@ -74,21 +52,9 @@ BOOL __free_program_name;
/****************************************************************************/
BOOL __stack_overflow;
UBYTE * __stk_limit;
/*UBYTE ** __stackborders;*/
/*UBYTE * __stk_initial;*/
ULONG __stk_maxsize;
ULONG __stk_size;
ULONG __stk_extensions;
/****************************************************************************/
#if defined(__SASC)
UBYTE * __base;
#endif /* __SASC */
BOOL __stack_overflow;
ULONG __stk_maxsize;
ULONG __stk_extensions;
/****************************************************************************/