Merge "Use trivial types to avoid calls to new for globals"
This commit is contained in:
commit
cc55bd8313
2 changed files with 4 additions and 1 deletions
|
@ -15,6 +15,7 @@
|
|||
*/
|
||||
|
||||
#include "linker_allocator.h"
|
||||
#include "linker_debug.h"
|
||||
#include "linker.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
@ -73,6 +74,8 @@ LinkerSmallObjectAllocator::LinkerSmallObjectAllocator()
|
|||
: type_(0), block_size_(0), free_pages_cnt_(0), free_blocks_list_(nullptr) {}
|
||||
|
||||
void* LinkerSmallObjectAllocator::alloc() {
|
||||
CHECK(block_size_ != 0);
|
||||
|
||||
if (free_blocks_list_ == nullptr) {
|
||||
alloc_page();
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
LinkerLogger g_linker_logger;
|
||||
|
||||
static const char* kSystemLdDebugProperty = "debug.ld.all";
|
||||
static const std::string kLdDebugPropertyPrefix = "debug.ld.app.";
|
||||
static const char* kLdDebugPropertyPrefix = "debug.ld.app.";
|
||||
|
||||
static const char* kOptionErrors = "dlerror";
|
||||
static const char* kOptionDlopen = "dlopen";
|
||||
|
|
Loading…
Reference in a new issue