// Returns the added heap segment static Seg* add_new_segment ( ThreadId tid, Addr p, SizeT size ) { Seg* seg = get_Seg_for_malloc(); tl_assert(seg != (Seg*)1); /* since we're using 1 as a special value */ seg->addr = p; seg->szB = size; seg->ec = VG_(record_ExeContext)( tid, 0/*first_ip_delta*/ ); tl_assert(!Seg__is_freed(seg)); bind_addr_to_Seg(p, seg); return seg; }
static Seg* add_new_segment ( ThreadId tid, Addr p, SizeT size ) { Seg* seg = get_Seg_for_malloc(); tl_assert(seg != (Seg*)1); seg->addr = p; seg->szB = size; seg->ec = VG_(record_ExeContext)( tid, 0 ); tl_assert(!Seg__is_freed(seg)); bind_addr_to_Seg(p, seg); return seg; }