* dcrt0.cc (dll_crt0_1): Add a CYGHEAP_DEBUG conditional for debugging which
allocates a lot of space at startup.
This commit is contained in:
parent
f65dbc7e27
commit
734e1c50ff
|
@ -1,3 +1,8 @@
|
|||
2011-02-18 Christopher Faylor <me+cygwin@cgf.cx>
|
||||
|
||||
* dcrt0.cc (dll_crt0_1): Add a CYGHEAP_DEBUG conditional for debugging
|
||||
which allocates a lot of space at startup.
|
||||
|
||||
2011-02-18 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* cygwin.sc: Set alignment of .cygheap section to 64K.
|
||||
|
|
|
@ -802,11 +802,20 @@ dll_crt0_1 (void *)
|
|||
malloc_init ();
|
||||
user_shared->initialize ();
|
||||
|
||||
#ifdef CGF
|
||||
#ifdef CYGHEAP_DEBUG
|
||||
int i = 0;
|
||||
const int n = 2 * 1024 * 1024;
|
||||
while (i--)
|
||||
small_printf ("cmalloc returns %p\n", cmalloc (HEAP_STR, n));
|
||||
{
|
||||
void *p = cmalloc (HEAP_STR, n);
|
||||
if (p)
|
||||
small_printf ("cmalloc returns %p\n", cmalloc (HEAP_STR, n));
|
||||
else
|
||||
{
|
||||
small_printf ("total allocated %p\n", (i - 1) * n);
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
ProtectHandle (hMainThread);
|
||||
|
|
Loading…
Reference in New Issue