Mercurial > flash_v2
comparison packages/services/memalloc/common/current/src/malloc.cxx @ 138:289bf90c6a9b
Merge from eCos master repository on 2000-11-24-06:43:05-GMT
| author | jlarmour |
|---|---|
| date | Fri, 24 Nov 2000 07:49:02 +0000 |
| parents | 6ed91473a1cd |
| children | 3902ef905c9c |
comparison
equal
deleted
inserted
replaced
| 137:eb9861b635da | 138:289bf90c6a9b |
|---|---|
| 108 | 108 |
| 109 CYG_REPORT_FUNCNAMETYPE( "malloc", "returning pointer %08x" ); | 109 CYG_REPORT_FUNCNAMETYPE( "malloc", "returning pointer %08x" ); |
| 110 | 110 |
| 111 CYG_REPORT_FUNCARG1DV( size ); | 111 CYG_REPORT_FUNCARG1DV( size ); |
| 112 | 112 |
| 113 #ifdef CYGSEM_MEMALLOC_MALLOC_ZERO_RETURNS_NULL | |
| 113 // first check if size wanted is 0 | 114 // first check if size wanted is 0 |
| 114 if ( 0 == size ) { | 115 if ( 0 == size ) { |
| 115 CYG_REPORT_RETVAL( NULL ); | 116 CYG_REPORT_RETVAL( NULL ); |
| 116 return NULL; | 117 return NULL; |
| 117 } // if | 118 } // if |
| 119 #endif | |
| 118 | 120 |
| 119 // ask the pool for the data | 121 // ask the pool for the data |
| 120 data_ptr = POOL.try_alloc( size ); | 122 data_ptr = POOL.try_alloc( size ); |
| 121 | 123 |
| 122 // if it isn't NULL is the pointer valid? | 124 // if it isn't NULL is the pointer valid? |
