Skip to content
Snippets Groups Projects
Commit db4fd66e authored by Sven M. Hallberg's avatar Sven M. Hallberg
Browse files

try it with a smaller alloc

parent e89d9f91
No related branches found
No related tags found
No related merge requests found
......@@ -32,8 +32,9 @@ static void test_tt_registry(void) {
// perform a big allocation during parsing to trigger out-of-memory handling
static HParsedToken *act_big_alloc(const HParseResult *r, void *user) {
void *buf = h_arena_malloc(r->arena, 1024*1024*1024);
void *buf = h_arena_malloc(r->arena, 500*1024*1024);
assert(buf != NULL);
g_test_message("Memory allocation was supposed to fail");
return NULL;
}
static void test_oom(void) {
......@@ -44,7 +45,7 @@ static void test_oom(void) {
int i;
i = getrlimit(RLIMIT_DATA, &bak);
assert(i == 0);
lim.rlim_cur = 1000*1024*1024; // never enough
lim.rlim_cur = 499*1024*1024; // never enough
if(lim.rlim_cur > bak.rlim_max)
lim.rlim_cur = bak.rlim_max;
lim.rlim_max = bak.rlim_max;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment