17 lines
526 B
C
17 lines
526 B
C
|
|
#ifndef HAKMEM_POOL_TLS_REGISTRY_H
|
||
|
|
#define HAKMEM_POOL_TLS_REGISTRY_H
|
||
|
|
|
||
|
|
#include <stddef.h>
|
||
|
|
#include <stdint.h>
|
||
|
|
#include <sys/types.h>
|
||
|
|
|
||
|
|
// Register an arena chunk range with owner thread id and class index
|
||
|
|
void pool_reg_register(void* base, size_t size, pid_t tid, int class_idx);
|
||
|
|
// Unregister a previously registered chunk
|
||
|
|
void pool_reg_unregister(void* base, size_t size, pid_t tid);
|
||
|
|
// Lookup owner for a pointer; returns 1 if found, 0 otherwise
|
||
|
|
int pool_reg_lookup(void* ptr, pid_t* tid_out, int* class_idx_out);
|
||
|
|
|
||
|
|
#endif
|
||
|
|
|