[pypy-svn] r27610 - pypy/branch/njriley-trans/pypy/translator/c/src

njriley at codespeak.net njriley at codespeak.net
Mon May 22 18:37:14 CEST 2006


Author: njriley
Date: Mon May 22 18:37:13 2006
New Revision: 27610

Modified:
   pypy/branch/njriley-trans/pypy/translator/c/src/ll_trans.h
Log:
Much less disgusting hack to dump memory map.

Modified: pypy/branch/njriley-trans/pypy/translator/c/src/ll_trans.h
==============================================================================
--- pypy/branch/njriley-trans/pypy/translator/c/src/ll_trans.h	(original)
+++ pypy/branch/njriley-trans/pypy/translator/c/src/ll_trans.h	Mon May 22 18:37:13 2006
@@ -85,6 +85,15 @@
 	int ret_val;
 	ret_val = enable_transactions();
 	if (ret_val != 0) {
+		pid_t pid = getpid();
+		char *map_path;
+		asprintf(&map_path, "/proc/%d/maps", pid);
+		if ( (pid = fork()) == 0) {
+			execlp("cat", "cat", map_path, NULL);
+			exit(0);
+		}
+		free(map_path);
+		waitpid(pid, NULL, 0);
 		printf("Load transactional memory module and press return\n");
 		while (getchar() != '\n');
 		ret_val = enable_transactions();



More information about the Pypy-commit mailing list