Export memalign to linker
In order to support demangling of rust symbols by the linker, we are adding a small Rust component. Rust expects `memalign` to be present in hosted environments, and it doesn't appear costly to enable it. Bug: 178565008 Test: m, killall -11 keystore2 produced mangled names in tombstone Change-Id: I8fc749000fa02a3b760c8cc55be3348b9964d931
This commit is contained in:
parent
556b45ad41
commit
2411a5e789
|
@ -72,6 +72,10 @@ void* malloc(size_t byte_count) {
|
||||||
return get_allocator().alloc(byte_count);
|
return get_allocator().alloc(byte_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void* memalign(size_t alignment, size_t byte_count) {
|
||||||
|
return get_allocator().memalign(alignment, byte_count);
|
||||||
|
}
|
||||||
|
|
||||||
void* calloc(size_t item_count, size_t item_size) {
|
void* calloc(size_t item_count, size_t item_size) {
|
||||||
return get_allocator().alloc(item_count*item_size);
|
return get_allocator().alloc(item_count*item_size);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue