Eliminate plain req::malloc, use malloc_unk explicitly or something better
commit2ee4fa93ca9b86c09d9e9933a8b3a6e4a9200722
authorEdwin Smith <smith@fb.com>
Sat, 20 May 2017 16:14:21 +0000 (20 09:14 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Sat, 20 May 2017 16:27:35 +0000 (20 09:27 -0700)
treead2588a33aafb8c2c407b6618e828bc73c0fe37f
parent9b46774a2bff14b83c118953bf4bbc5ede769890
Eliminate plain req::malloc, use malloc_unk explicitly or something better

Summary:
The default type for req::malloc(size,type) is Unknown; we don't
call it very often, and we want to make it hard to get by accident.
So, make the type_scan::Index argument required, and add req::malloc_unk(size)
for when the type is truly unknown. Rename existing callsites.

Reviewed By: ricklavoie

Differential Revision: D5062869

fbshipit-source-id: 44674457f7ed9e879edded17ef9515a7689d9762
13 files changed:
hphp/runtime/base/memory-manager.cpp
hphp/runtime/base/req-malloc.h
hphp/runtime/base/zend-custom-element.cpp
hphp/runtime/ext/fileinfo/libmagic/compat.h
hphp/runtime/ext/gd/libgd/gd.h
hphp/runtime/ext/icu/ext_icu_collator.cpp
hphp/runtime/ext/ldap/ext_ldap.cpp
hphp/runtime/ext/mysql/mysql_common.cpp
hphp/runtime/ext/odbc/ext_odbc.cpp
hphp/runtime/ext/std/ext_std_options.cpp
hphp/runtime/ext/xdebug/xdebug_profiler.cpp
hphp/runtime/ext/xml/ext_xml.cpp
hphp/runtime/ext_zend_compat/php-src/Zend/zend_alloc.cpp