Commit graph

14 commits

Author SHA1 Message Date
Sven M. Hallberg
3fc56a0dc3 add h_alloc() which calls errx() on failure and use it for all basic allocation
Rationale: "Basic allocation" refers to things outside of parsing proper,
mostly initialization. If such allocations fail, the system is globally
emory-starved from which it will likely not recover by returning failure.
In this case, terminating the process is in fact the most robust strategy as
it may mean the difference between a permanent hang and a temporary crash.
2015-11-30 16:37:00 +01:00
Sven M. Hallberg
9ef70f2f2d never return if h_arena_malloc fails, call errx() or longjmp() 2015-10-30 21:23:45 +01:00
Steven Dee
b1078c3d88 llvm doesn't care about your size
They apparently removed alloc_size at some point (it was a no-op
beforehand), causing the attribute to throw an error when clang compiles
anything including allocator.h.
2014-12-07 02:27:28 -05:00
Meredith L. Patterson
1d6a6d90ab C++ bindings now work! 2014-01-16 19:49:28 +01:00
Meredith L. Patterson
34062d50a2 Import combinator and allocator APIs into SWIG. Next is glue. Need to fix unions in HParsedToken and HCaseResult. 2013-11-19 19:15:13 -06:00
Dan Hirsch
b8314f6662 Added regex backend, does not compile 2013-01-13 17:01:10 +01:00
Dan Hirsch
d5729efa1f Replaced glib memory allocation 2012-10-10 15:58:03 +02:00
Dan Hirsch
69ba191783 Added singly-linked list 2012-10-08 17:11:47 +02:00
Dan Hirsch
0284c99f12 Renamed all the public functions 2012-05-26 14:06:52 +02:00
Dan Hirsch
199cde7058 Renamed more types 2012-05-26 13:01:23 +02:00
Dan Hirsch
97f9c472e1 Merge remote-tracking branch 'bunter/master' 2012-05-12 23:05:09 +01:00
Dan Hirsch
3504bde301 Log memory usage diagnostics, fix test_not, add ability to compile in debug mode 2012-05-12 23:04:54 +01:00
Meredith L. Patterson
0164ddc98d Merge branch 'master' of 10.24.0.1:Projects/hammer. Also, licenses for everything!
Conflicts:
	src/hammer.c
2012-05-12 22:26:59 +01:00
Dan Hirsch
79f9e21da7 Bolted on arena allocator 2012-05-12 21:20:38 +01:00
Renamed from lib/allocator.h (Browse further)