Symbian platform (C++)
SDK native APIs, runtime and tooling
Loading...
Searching...
No Matches
mimalloc_port.h
Go to the documentation of this file.
1// Copyright 2026 Symbian SDK Authors.
2// Licensed under the Apache License, Version 2.0.
3// Target-only configuration for the pinned MIT-licensed mimalloc sources.
4#ifndef SYMBIAN_RUNTIME_MIMALLOC_PORT_H_
5#define SYMBIAN_RUNTIME_MIMALLOC_PORT_H_
6
7#include <e32def.h>
8#include <stdint.h>
9
10#define MI_TLS_MODEL_PTHREADS 1
11// Cache only mimalloc's own default/cached theap keys. The native bridge
12// mirrors every write to pthread TLS so a miss retains the original contract.
13#define pthread_getspecific SymbianMimallocGetSpecific
14#define pthread_setspecific SymbianMimallocSetSpecific
15extern uintptr_t SymbianRuntimeMimallocThreadId(void);
16#define MI_PRIM_THREAD_ID() SymbianRuntimeMimallocThreadId()
17
18#endif // SYMBIAN_RUNTIME_MIMALLOC_PORT_H_
uintptr_t SymbianRuntimeMimallocThreadId(void)
Definition sdk_mimalloc_pages.cc:257