diff --git a/src/servers/app/server/areafunc.c b/src/servers/app/server/areafunc.c index 7414af323a..913a2f0b52 100644 --- a/src/servers/app/server/areafunc.c +++ b/src/servers/app/server/areafunc.c @@ -28,6 +28,7 @@ #include "bget.h" #include +void set_area_buffer_management(void); void * expand_area_storage(long size); void contract_area_storage(void *buffer); diff --git a/src/servers/app/server/bget.c b/src/servers/app/server/bget.c index 27e32a9cfa..c4dc9eadaa 100644 --- a/src/servers/app/server/bget.c +++ b/src/servers/app/server/bget.c @@ -198,7 +198,7 @@ void *bget(requested_size) assert(size > 0); - if (size < SizeQ) { /* Need at least room for the */ + if (size < (bufsize)SizeQ) { /* Need at least room for the */ size = SizeQ; /* queue links. */ } #ifdef SizeQuant @@ -250,7 +250,7 @@ void *bget(requested_size) buffer if enough room remains for a header plus the minimum quantum of allocation. */ - if ((b->bh.bsize - size) > (SizeQ + (sizeof(struct bhead)))) { + if ((b->bh.bsize - size) > (bufsize)(SizeQ + (sizeof(struct bhead)))) { struct bhead *ba, *bn; ba = BH(((char *) b) + (b->bh.bsize - size)); @@ -319,7 +319,7 @@ void *bget(requested_size) /* Don't give up yet -- look in the reserve supply. */ if (acqfcn != NULL) { - if (size > exp_incr - sizeof(struct bhead)) { + if (size > (bufsize)(exp_incr - sizeof(struct bhead))) { /* Request is too large to fit in a single expansion block. Try to satisy it by a direct buffer acquisition. */ @@ -560,7 +560,7 @@ void brel(buf) pool blocks are the same size. */ if (relfcn != NULL && - ((bufsize) b->bh.bsize) == (pool_len - sizeof(struct bhead))) { + ((bufsize) b->bh.bsize) == (bufsize)(pool_len - sizeof(struct bhead))) { assert(b->bh.prevfree == 0); assert(BH((char *) b + b->bh.bsize)->bsize == ESent); @@ -799,7 +799,7 @@ void bpoold(buf, dumpalloc, dumpfree) (long) bs, lerr); #ifdef FreeWipe lerr = ((char *) b) + sizeof(struct bfhead); - if ((bs > sizeof(struct bfhead)) && ((*lerr != 0x55) || + if ((bs > (bufsize)sizeof(struct bfhead)) && ((*lerr != 0x55) || (memcmp(lerr, lerr + 1, (MemSize) (bs - (sizeof(struct bfhead) + 1))) != 0))) { V printf( @@ -847,7 +847,7 @@ int bpoolv(buf) } #ifdef FreeWipe lerr = ((char *) b) + sizeof(struct bfhead); - if ((bs > sizeof(struct bfhead)) && ((*lerr != 0x55) || + if ((bs > (bufsize)sizeof(struct bfhead)) && ((*lerr != 0x55) || (memcmp(lerr, lerr + 1, (MemSize) (bs - (sizeof(struct bfhead) + 1))) != 0))) { V printf(