Lines Matching refs:options

318   void CheckOptions(const AllocatorOptions &options) const {
319 CHECK_GE(options.min_redzone, 16);
320 CHECK_GE(options.max_redzone, options.min_redzone);
321 CHECK_LE(options.max_redzone, 2048);
322 CHECK(IsPowerOfTwo(options.min_redzone));
323 CHECK(IsPowerOfTwo(options.max_redzone));
326 void SharedInitCode(const AllocatorOptions &options) {
327 CheckOptions(options);
328 quarantine.Init((uptr)options.quarantine_size_mb << 20,
329 (uptr)options.thread_local_quarantine_size_kb << 10);
330 atomic_store(&alloc_dealloc_mismatch, options.alloc_dealloc_mismatch,
332 atomic_store(&min_redzone, options.min_redzone, memory_order_release);
333 atomic_store(&max_redzone, options.max_redzone, memory_order_release);
336 void InitLinkerInitialized(const AllocatorOptions &options) {
337 SetAllocatorMayReturnNull(options.may_return_null);
338 allocator.InitLinkerInitialized(options.release_to_os_interval_ms);
339 SharedInitCode(options);
372 void ReInitialize(const AllocatorOptions &options) {
373 SetAllocatorMayReturnNull(options.may_return_null);
374 allocator.SetReleaseToOSIntervalMs(options.release_to_os_interval_ms);
375 SharedInitCode(options);
389 void GetOptions(AllocatorOptions *options) const {
390 options->quarantine_size_mb = quarantine.GetSize() >> 20;
391 options->thread_local_quarantine_size_kb = quarantine.GetCacheSize() >> 10;
392 options->min_redzone = atomic_load(&min_redzone, memory_order_acquire);
393 options->max_redzone = atomic_load(&max_redzone, memory_order_acquire);
394 options->may_return_null = AllocatorMayReturnNull();
395 options->alloc_dealloc_mismatch =
397 options->release_to_os_interval_ms = allocator.ReleaseToOSIntervalMs();
915 void InitializeAllocator(const AllocatorOptions &options) {
916 instance.InitLinkerInitialized(options);
919 void ReInitializeAllocator(const AllocatorOptions &options) {
920 instance.ReInitialize(options);
923 void GetAllocatorOptions(AllocatorOptions *options) {
924 instance.GetOptions(options);