mark more unlikely code paths

This commit is contained in:
Daniel Micay 2018-09-07 02:53:15 -04:00
parent 191f9667df
commit 7ae7abedea

View File

@ -1001,7 +1001,7 @@ EXPORT size_t h_malloc_usable_size(void *p) {
}
EXPORT size_t h_malloc_object_size(void *p) {
if (p == NULL || !is_init()) {
if (p == NULL || unlikely(!is_init())) {
return 0;
}
@ -1019,7 +1019,7 @@ EXPORT size_t h_malloc_object_size(void *p) {
}
EXPORT size_t h_malloc_object_size_fast(void *p) {
if (p == NULL || !is_init()) {
if (p == NULL || unlikely(!is_init())) {
return 0;
}
@ -1036,7 +1036,7 @@ EXPORT int h_mallopt(UNUSED int param, UNUSED int value) {
}
EXPORT int h_malloc_trim(UNUSED size_t pad) {
if (!is_init()) {
if (unlikely(!is_init())) {
return 0;
}