aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/parser.h
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2017-03-05 18:15:05 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2017-03-05 18:15:05 +0100
commit39cfc5731695c46a337606da9bc86a659dbad5b3 (patch)
treeafbbdd276794d53bccdb17878b74913a7fd09341 /src/parser.h
parentc32a1997d0add7bf4a6d9b43d29bb3cac7a287b9 (diff)
downloadsciteco-39cfc5731695c46a337606da9bc86a659dbad5b3.tar.gz
replaced Linux-specific mallinfo()-based memory limiting with a more portable and faster hack
* Works by "hooking" into malloc() and friends and counting the usable heap object sizes with malloc_usable_size(). Thus, it has no memory-overhead. * Will work at least on Linux and (Free)BSD. Other UNIXoid systems may work as well - this is tested by ./configure. * Usually faster than even the fallback implementation since the memory limit is hit earlier. * A similar approach could be tried on Windows (TODO). * A proper memory-limiting counting all malloc()s in the system can make a huge difference as this test case shows: sciteco -e '<@EU[X^E\a]"^E\a"%a>' It will allocate gigabytes before hitting the 500MB memory limit... * Fixed the UNIX-function checks on BSDs.
Diffstat (limited to 'src/parser.h')
0 files changed, 0 insertions, 0 deletions