X-Git-Url: https://git.distorted.org.uk/~mdw/mLib/blobdiff_plain/b5ea4de3ac1c61ef84c21f4e3ceff2181d23e456..e109873133d224df7973bceedae82172924cd69e:/arena.h diff --git a/arena.h b/arena.h index 4b1dffe..82f6cd6 100644 --- a/arena.h +++ b/arena.h @@ -1,13 +1,11 @@ /* -*-c-*- * - * $Id: arena.h,v 1.2 2000/07/16 12:29:16 mdw Exp $ - * * Abstraction for memory allocation arenas * * (c) 2000 Straylight/Edgeware */ -/*----- Licensing notice --------------------------------------------------* +/*----- Licensing notice --------------------------------------------------* * * This file is part of the mLib utilities library. * @@ -15,29 +13,18 @@ * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. - * + * * mLib is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. - * + * * You should have received a copy of the GNU Library General Public * License along with mLib; if not, write to the Free * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ -/*----- Revision history --------------------------------------------------* - * - * $Log: arena.h,v $ - * Revision 1.2 2000/07/16 12:29:16 mdw - * Change to arena `realloc' interface, to fix a design bug. - * - * Revision 1.1 2000/06/17 10:37:53 mdw - * Basic arena management. - * - */ - #ifndef MLIB_ARENA_H #define MLIB_ARENA_H @@ -54,9 +41,9 @@ /* --- An arena structure --- */ typedef struct arena { - struct arena_ops *ops; + const struct arena_ops *ops; } arena; - + typedef struct arena_ops { void *(*alloc)(arena */*a*/, size_t /*sz*/); void *(*realloc)(arena */*a*/, void */*p*/, size_t /*sz*/, size_t /*osz*/);