… | |
… | |
469 | LOG (llevError, "fork abort: %s\n", msg); |
469 | LOG (llevError, "fork abort: %s\n", msg); |
470 | } |
470 | } |
471 | |
471 | |
472 | void *salloc_ (int n) throw (std::bad_alloc) |
472 | void *salloc_ (int n) throw (std::bad_alloc) |
473 | { |
473 | { |
474 | #ifdef PREFER_MALLOC |
474 | #if PREFER_MALLOC |
475 | void *ptr = malloc (n); |
475 | void *ptr = malloc (n); |
476 | #else |
476 | #else |
477 | slice_alloc += n; |
477 | slice_alloc += n; |
478 | void *ptr = g_slice_alloc (n); |
478 | void *ptr = g_slice_alloc (n); |
479 | #endif |
479 | #endif |
… | |
… | |
496 | return ptr; |
496 | return ptr; |
497 | } |
497 | } |
498 | |
498 | |
499 | /******************************************************************************/ |
499 | /******************************************************************************/ |
500 | |
500 | |
501 | #ifdef DEBUG_SALLOC |
501 | #if DEBUG_SALLOC |
502 | |
502 | |
503 | #define MAGIC 0xa1b2c35543deadLL |
503 | #define MAGIC 0xa1b2c35543deadLL |
504 | |
504 | |
505 | void *g_slice_alloc (unsigned long size) |
505 | void *g_slice_alloc (unsigned long size) |
506 | { |
506 | { |