X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fnmem.c;h=4b6d0a4c6114f0e1d7ebd6fb06e96d84ee89c45d;hp=93988b55b5db1f9f350e42745d409c0a561bb7a5;hb=4e50d9461c89fb538b1826f9cecf4475deaeed3b;hpb=f0128dd11d08d79384a97a13e44476769b061f4f diff --git a/src/nmem.c b/src/nmem.c index 93988b5..4b6d0a4 100644 --- a/src/nmem.c +++ b/src/nmem.c @@ -10,8 +10,6 @@ * This is a simple and fairly wasteful little module for nibble memory * allocation. Evemtually we'll put in something better. * - * FIXME - it also has some semaphore stuff, and stuff to handle errno. - * These should be moved to some other place! */ #if HAVE_CONFIG_H #include @@ -38,7 +36,7 @@ struct nmem_block struct nmem_control { - int total; + size_t total; struct nmem_block *blocks; struct nmem_control *next; }; @@ -111,7 +109,7 @@ void nmem_reset(NMEM n) n->total = 0; } -void *nmem_malloc(NMEM n, int size) +void *nmem_malloc(NMEM n, size_t size) { struct nmem_block *p; char *r; @@ -135,7 +133,7 @@ void *nmem_malloc(NMEM n, int size) return r; } -int nmem_total(NMEM n) +size_t nmem_total(NMEM n) { return n->total; }