counterpart VG_(client_alloc) to VG_(get_memory_from_mmap_for_client).
Man, this low level memory management is an undisciplined mess.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3376
} else if (a->clientmem) {
// client allocation -- return 0 to client if it fails
sb = (Superblock *)
- VG_(client_alloc)(0, cszB,
- VKI_PROT_READ|VKI_PROT_WRITE|VKI_PROT_EXEC, 0);
+ VG_(get_memory_from_mmap_for_client)
+ (0, cszB, VKI_PROT_READ|VKI_PROT_WRITE|VKI_PROT_EXEC, 0);
if (NULL == sb)
return 0;
} else {
/*--------------------------------------------------------------------*/
// Returns 0 on failure.
-Addr VG_(client_alloc)(Addr addr, SizeT len, UInt prot, UInt sf_flags)
+Addr VG_(get_memory_from_mmap_for_client)
+ (Addr addr, SizeT len, UInt prot, UInt sf_flags)
{
len = PGROUNDUP(len);
return 0;
}
-void VG_(client_free)(Addr addr)
-{
- Segment *s = VG_(find_segment)(addr);
-
-vg_assert(0);
- if (s == NULL || s->addr != addr || !(s->flags & SF_CORE)) {
- VG_(message)(Vg_DebugMsg, "VG_(client_free)(%p) - no CORE memory found there", addr);
- return;
- }
-
- VG_(munmap)((void *)s->addr, s->len);
-}
/* We'll call any RW mmaped memory segment, within the client address
range, which isn't SF_CORE, a root. */
extern Bool VG_(is_addressable)(Addr p, SizeT sz, UInt prot);
-extern Addr VG_(client_alloc)(Addr base, SizeT len, UInt prot, UInt flags);
-extern void VG_(client_free)(Addr addr);
+extern Addr VG_(get_memory_from_mmap_for_client)
+ (Addr base, SizeT len, UInt prot, UInt flags);
extern Bool VG_(is_valgrind_addr)(Addr a);