Loading...
--- Libc/Libc-262.3.2/gen/stack_logging.c
+++ Libc/Libc-320.1.3/gen/stack_logging.c
@@ -2,8 +2,6 @@
* Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
- *
- * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
@@ -31,6 +29,8 @@
#import <pthread.h>
#import <mach/mach.h>
#include <mach/vm_statistics.h>
+#import <malloc/malloc.h>
+#import <stdlib.h>
extern void spin_lock(int *);
@@ -38,7 +38,8 @@
void *address;
if (vm_allocate(mach_task_self(), (vm_address_t *)&address, bytes,
VM_MAKE_TAG(VM_MEMORY_ANALYSIS_TOOL)| TRUE)) {
- address = 0;
+ malloc_printf("malloc[%d]: Out of memory while stack logging\n", getpid());
+ abort();
}
return (void *)address;
}