X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fnmem.c;h=f1fcb1ae5bace1280474d1ee601f0f0182b339df;hb=fe3ae86a97bef6a815e2f04cdcaa77307801c902;hp=0ce4ca6b80d50ad2f66a130e88b1bba4fdc037d4;hpb=f517f60a95e2f94edd1efd750024642b5941ef08;p=yaz-moved-to-github.git diff --git a/src/nmem.c b/src/nmem.c index 0ce4ca6..f1fcb1a 100644 --- a/src/nmem.c +++ b/src/nmem.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: nmem.c,v 1.15 2005-04-29 10:36:05 heikki Exp $ + * $Id: nmem.c,v 1.17 2005-06-03 20:33:13 adam Exp $ */ /** @@ -43,6 +43,21 @@ #define NMEM_CHUNK (4*1024) +struct nmem_block +{ + char *buf; /* memory allocated in this block */ + size_t size; /* size of buf */ + size_t top; /* top of buffer */ + struct nmem_block *next; +}; + +struct nmem_control +{ + int total; + nmem_block *blocks; + struct nmem_control *next; +}; + struct align { char x; union {