|
From: <sv...@va...> - 2005-10-06 12:05:15
|
Author: tom
Date: 2005-10-06 13:05:06 +0100 (Thu, 06 Oct 2005)
New Revision: 4880
Log:
Merge memalign fix from trunk to stable branch.
Modified:
branches/VALGRIND_3_0_BRANCH/coregrind/m_mallocfree.c
Modified: branches/VALGRIND_3_0_BRANCH/coregrind/m_mallocfree.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_0_BRANCH/coregrind/m_mallocfree.c 2005-10-06 12:0=
4:26 UTC (rev 4879)
+++ branches/VALGRIND_3_0_BRANCH/coregrind/m_mallocfree.c 2005-10-06 12:0=
5:06 UTC (rev 4880)
@@ -1151,6 +1151,10 @@
base_p =3D VG_(arena_malloc) ( aid, base_pszB_req );
a->bytes_on_loan =3D saved_bytes_on_loan;
=20
+ /* Give up if we couldn't allocate enough space */
+ if (base_p =3D=3D 0)
+ return 0;
+
/* Block ptr for the block we are going to split. */
base_b =3D get_payload_block ( a, base_p );
=20
|