Mercurial > flash_v2
diff packages/services/memalloc/common/current/src/dlmalloc.cxx @ 1687:eb235374a7ae
2004-06-24 Oyvind Harboe <oyvind.harboe@zylin.com>
* Added cyg_memalloc_alloc_fail() fn which is invoked before
return NULL from failed allocations. Useful breakpoint site.
Andrew Lunn wrote some of the code and pointed out various
wrinkles to be ironed out.
| author | asl |
|---|---|
| date | Mon, 05 Jul 2004 11:07:04 +0000 |
| parents | 28c8c2fbb86e |
| children |
line wrap: on
line diff
--- a/packages/services/memalloc/common/current/src/dlmalloc.cxx +++ b/packages/services/memalloc/common/current/src/dlmalloc.cxx @@ -215,7 +215,6 @@ #include <cyg/infra/cyg_ass.h> // assertions #include <stddef.h> // for size_t #include <cyg/memalloc/dlmalloc.hxx> -//#include <cyg/infra/diag.h> /* Debugging: @@ -1273,6 +1272,7 @@ Cyg_Mempool_dlmalloc_Implementation::try //diag_printf("chunksize(top)=%ld, nb=%d, remainder=%ld\n", chunksize(top), // nb, remainder_size); MALLOC_UNLOCK; + CYG_MEMALLOC_FAIL(bytes); return NULL; /* propagate failure */ } @@ -1558,6 +1558,7 @@ Cyg_Mempool_dlmalloc_Implementation::res // couldn't resize the allocation any direction, so return failure MALLOC_UNLOCK; + CYG_MEMALLOC_FAIL(bytes); return NULL; }
