mailing list of musl libc
 help / color / mirror / code / Atom feed
a440a4eab2d39172d6e0358a2aec34b98e21aba3 blob 302 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
 
#include <stdlib.h>
#include "meta.h"

size_t malloc_usable_size(void *p)
{
	struct meta *g = get_meta(p);
	int idx = get_slot_index(p);
	size_t stride = get_stride(g);
	unsigned char *start = g->mem->storage + stride*idx;
	unsigned char *end = start + stride - IB;
	return get_nominal_size(p, end);
}
debug log:

solving a440a4ea ...
found a440a4ea in https://git.vuxu.org/mirror/musl/

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).