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

fix for clean compilation

This commit is contained in:
Alasdair Kergon 2001-12-12 16:25:53 +00:00
parent 0803634cd1
commit 394fae7fc5
4 changed files with 8 additions and 23 deletions

View File

@ -7,6 +7,7 @@
#ifndef _LVM_DBG_MALLOC_H
#define _LVM_DBG_MALLOC_H
#include <stdlib.h>
#include <sys/types.h>
#ifdef DEBUG_MEM
@ -29,8 +30,3 @@ void bounds_check(void);
#endif
/*
* Local variables:
* c-file-style: "linux"
* End:
*/

View File

@ -123,17 +123,19 @@ void pool_free(struct pool *p, void *ptr)
void *pool_begin_object(struct pool *p, size_t init_size)
{
assert(!p->object);
pool_alloc_aligned(p, hint);
pool_alloc_aligned(p, init_size, DEFAULT_ALIGNMENT);
p->object = 1;
return &p->tail->data;
}
void *pool_grow_object(struct pool *p, unsigned char *buffer, size_t delta)
void *pool_grow_object(struct pool *p, void *buffer, size_t delta)
{
struct block *old = p->tail, *new;
assert(buffer == &old->data);
if (!pool_alloc(p, old->size + n))
if (!pool_alloc(p, old->size + delta))
return NULL;
new = p->tail;

View File

@ -155,7 +155,7 @@ void *pool_begin_object(struct pool *p, size_t init_size)
return c->begin;
}
void *pool_grow_object(struct pool *p, unsigned char *buffer, size_t n)
void *pool_grow_object(struct pool *p, void *buffer, size_t n)
{
struct chunk *c = p->chunk, *nc;
@ -233,9 +233,3 @@ struct chunk *_new_chunk(struct pool *p, size_t s)
return c;
}
/*
* Local variables:
* c-file-style: "linux"
* End:
* vim:ai cin ts=8
*/

View File

@ -24,7 +24,7 @@ void pool_free(struct pool *p, void *ptr);
/* object building routines */
void *pool_begin_object(struct pool *p, size_t init_size);
void *pool_grow_object(struct pool *p, unsigned char *buffer, size_t delta);
void *pool_grow_object(struct pool *p, void *buffer, size_t delta);
void *pool_end_object(struct pool *p);
void pool_abandon_object(struct pool *p);
@ -42,10 +42,3 @@ static inline void *pool_zalloc(struct pool *p, size_t s) {
#endif
/*
* Local variables:
* c-file-style: "linux"
* End:
* vim:ai cin ts=4
*/