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:
parent
f8427641b0
commit
cf633b70c2
@ -32,7 +32,8 @@ struct pool *pool_create(size_t chunk_hint)
|
||||
struct pool *mem = dbg_malloc(sizeof(*mem));
|
||||
|
||||
if (!mem) {
|
||||
stack;
|
||||
log_error("Couldn't create memory pool (size %u)",
|
||||
sizeof(*mem));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -79,7 +80,7 @@ static struct block *_new_block(size_t s, unsigned alignment)
|
||||
struct block *b = dbg_malloc(len);
|
||||
|
||||
if (!b) {
|
||||
log_err("Out of memory.");
|
||||
log_err("Out of memory. Requested %u bytes.", len);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,8 @@ struct pool *pool_create(size_t chunk_hint)
|
||||
struct pool *p = dbg_malloc(sizeof(*p));
|
||||
|
||||
if (!p) {
|
||||
log_error("Couldn't create memory pool");
|
||||
log_error("Couldn't create memory pool (size %u)",
|
||||
sizeof(*p));
|
||||
return 0;
|
||||
}
|
||||
memset(p, 0, sizeof(*p));
|
||||
@ -223,7 +224,7 @@ struct chunk *_new_chunk(struct pool *p, size_t s)
|
||||
p->spare_chunk = 0;
|
||||
} else {
|
||||
if (!(c = dbg_malloc(s))) {
|
||||
log_err("Out of memory.");
|
||||
log_err("Out of memory. Requested %u bytes.", s);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user