cvs: /php4 main.c
| From: | Zeev Suraski | Date: | Sat, 28 Aug 1999 11:17:28 +0000 |
| Subject: | cvs: /php4 main.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-3804@lists.php.net to get a copy of this message | ||
zeev Sat Aug 28 07:17:28 1999 EDT
Modified files:
/php4 main.c
Log:
New relay code
Index: php4/main.c
diff -u php4/main.c:1.102 php4/main.c:1.103
--- php4/main.c:1.102 Fri Aug 27 00:51:49 1999
+++ php4/main.c Sat Aug 28 07:17:28 1999
@@ -19,7 +19,7 @@
*/
-/* $Id: main.c,v 1.102 1999/08/27 04:51:49 zeev Exp $ */
+/* $Id: main.c,v 1.103 1999/08/28 11:17:28 zeev Exp $ */
#include <stdio.h>
@@ -603,19 +603,17 @@
mem_header *t = (mem_header *) data;
void *ptr = (void *)((char *)t+sizeof(mem_header)+PLATFORM_PADDING);
-#if WIN32||WINNT
snprintf(memory_leak_buf, 512, "%s(%d) : Freeing 0x%0.8X (%d bytes), script=%s\n",
t->filename, t->lineno, (unsigned long)ptr, t->size,
SAFE_FILENAME(SG(request_info).path_translated));
-#else
- snprintf(memory_leak_buf, 512, "%s: Freeing 0x%0.8lX (%d bytes), allocated in %s on
line %d<br>\n", SAFE_FILENAME(SG(request_info).path_translated), (unsigned long)ptr,
t->size,t->filename,t->lineno);
-#endif
+ if (t->orig_filename) {
+ char relay_buf[512];
+
+ snprintf(relay_buf, 512, "%s(%d) : Actual location (location was relayed)\n",
t->orig_filename, t->orig_lineno);
+ strcat(memory_leak_buf, relay_buf);
+ }
} else {
unsigned long leak_count = (unsigned long) data;
-#if WIN32||WINNT
snprintf(memory_leak_buf, 512, "Last leak repeated %ld time%s\n", leak_count,
(leak_count>1?"s":""));
-#else
- snprintf(memory_leak_buf, 512, "%s: Last leak repeated %ld time%s\n",
SAFE_FILENAME(SG(request_info).path_translated), leak_count,
(leak_count>1?"s":""));
-#endif
}
# if WIN32||WINNT
OutputDebugString(memory_leak_buf);