aboutsummaryrefslogtreecommitdiffstats
path: root/allocate.h
Commit message (Collapse)AuthorAgeFilesLines
* allocate.h: Stop needlessly returning a void value in __DO_ALLOCATORJosh Triplett2007-07-221-1/+1
| | | | Signed-off-by: Josh Triplett <josh@freedesktop.org>
* Make the ptrlist using the sparse allocator.Christopher Li2007-02-221-2/+5
| | | | | | We can drop the whole allocator without freeing the ptrlist one by one. Signed-off-by: Christopher Li <sparse@chrisli.org>
* [PATCH] Parse and track multiple contexts by expressionJosh Triplett2006-08-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | sparse currently only tracks one global context for __context__ and __attribute__((context)). This adds support for parsing an additional argument to each of these which gives a context expression. For __attribute__((context)), store each context attribute as a separate context structure containing the expression, the entry context, and the exit context, and keep a list of these structures in the ctype. For __context__, store the context expression in the context instruction. Modify the various frontends to adapt to this change, without changing functionality. This change should not affect parsing of programs which worked with previous versions of sparse, unless those programs use comma expressions as arguments to __context__ or __attribute__((context)), which seems highly dubious and unlikely. sparse with -Wcontext generates identical output with or without this change on Linux 2.6.18-rc4. Signed-off-by: Josh Triplett <josh@freedesktop.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Add function to "protect" allocations from being dropped laterLinus Torvalds2005-08-031-2/+8
| | | | | | Useful for the initial (shared) token allocations: we do want to drop the per-file tokens once they aren't needed any more, but we don't want to protect the shared global token allocations.
* Allow anybody to declare their own allocator by making theLinus Torvalds2005-04-071-0/+25
| | | | | | | helper macros available in the "allocate.h" header file. The declarations stay in "allocate.c" for now, but at least you _can_ make private allocators now if you want to.
* Split out the blob allocator from lib.c into allocate.c.Linus Torvalds2005-04-071-0/+46
It's disgusting how intimate lib.c is with all the types, and this is slowly trying to split things up a bit. Now the intimate part is in allocate.c, but maybe we can get to the point where each allocation user just declares its own allocation strategy, and just uses the generic routines in allocate.c