1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

More detail in error msgs.

This commit is contained in:
Alasdair Kergon 2002-01-10 16:47:25 +00:00
parent f8427641b0
commit cf633b70c2
2 changed files with 6 additions and 4 deletions

View File

@ -32,7 +32,8 @@ struct pool *pool_create(size_t chunk_hint)
struct pool *mem = dbg_malloc(sizeof(*mem)); struct pool *mem = dbg_malloc(sizeof(*mem));
if (!mem) { if (!mem) {
stack; log_error("Couldn't create memory pool (size %u)",
sizeof(*mem));
return NULL; return NULL;
} }
@ -79,7 +80,7 @@ static struct block *_new_block(size_t s, unsigned alignment)
struct block *b = dbg_malloc(len); struct block *b = dbg_malloc(len);
if (!b) { if (!b) {
log_err("Out of memory."); log_err("Out of memory. Requested %u bytes.", len);
return NULL; return NULL;
} }

View File

@ -36,7 +36,8 @@ struct pool *pool_create(size_t chunk_hint)
struct pool *p = dbg_malloc(sizeof(*p)); struct pool *p = dbg_malloc(sizeof(*p));
if (!p) { if (!p) {
log_error("Couldn't create memory pool"); log_error("Couldn't create memory pool (size %u)",
sizeof(*p));
return 0; return 0;
} }
memset(p, 0, sizeof(*p)); memset(p, 0, sizeof(*p));
@ -223,7 +224,7 @@ struct chunk *_new_chunk(struct pool *p, size_t s)
p->spare_chunk = 0; p->spare_chunk = 0;
} else { } else {
if (!(c = dbg_malloc(s))) { if (!(c = dbg_malloc(s))) {
log_err("Out of memory."); log_err("Out of memory. Requested %u bytes.", s);
return NULL; return NULL;
} }