From b18d7b706dddb6fff660fae9671552e80804da69 Mon Sep 17 00:00:00 2001 From: Peter Szabo Date: Tue, 27 Feb 2018 14:58:07 +0100 Subject: [PATCH] bugfix: made operator new able to allocate >= 4 GiB; this fixes https://github.com/pts/sam2p/issues/19 --- c_lgcc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_lgcc.cpp b/c_lgcc.cpp index e7cbcc0..775c54d 100644 --- a/c_lgcc.cpp +++ b/c_lgcc.cpp @@ -31,7 +31,7 @@ extern "C" void __pure_virtual(); void __pure_virtual() { abort(); } * works for g++-4.2.1 and g++-4.4.1 as well * removed dependency on stdio, so we get more reliable OOM reporting */ -static void* emulate_cc_new(unsigned len) { \ +static void* emulate_cc_new(size_t len) { \ void *p = malloc(len); if (p == 0) { /* Don't use stdio (e.g. fputs), because that may want to allocate more