comparison include/objalloc.h @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents a06113de4d67
children 84e7813d76e9
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* objalloc.h -- routines to allocate memory for objects 1 /* objalloc.h -- routines to allocate memory for objects
2 Copyright 1997, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1997-2017 Free Software Foundation, Inc.
3 Written by Ian Lance Taylor, Cygnus Solutions. 3 Written by Ian Lance Taylor, Cygnus Solutions.
4 4
5 This program is free software; you can redistribute it and/or modify it 5 This program is free software; you can redistribute it and/or modify it
6 under the terms of the GNU General Public License as published by the 6 under the terms of the GNU General Public License as published by the
7 Free Software Foundation; either version 2, or (at your option) any 7 Free Software Foundation; either version 2, or (at your option) any
89 ({ struct objalloc *__o = (o); \ 89 ({ struct objalloc *__o = (o); \
90 unsigned long __len = (l); \ 90 unsigned long __len = (l); \
91 if (__len == 0) \ 91 if (__len == 0) \
92 __len = 1; \ 92 __len = 1; \
93 __len = (__len + OBJALLOC_ALIGN - 1) &~ (OBJALLOC_ALIGN - 1); \ 93 __len = (__len + OBJALLOC_ALIGN - 1) &~ (OBJALLOC_ALIGN - 1); \
94 (__len <= __o->current_space \ 94 (__len != 0 && __len <= __o->current_space \
95 ? (__o->current_ptr += __len, \ 95 ? (__o->current_ptr += __len, \
96 __o->current_space -= __len, \ 96 __o->current_space -= __len, \
97 (void *) (__o->current_ptr - __len)) \ 97 (void *) (__o->current_ptr - __len)) \
98 : _objalloc_alloc (__o, __len)); }) 98 : _objalloc_alloc (__o, __len)); })
99 99