server-skynet-source-3rd-je.../include/jemalloc/internal/pa.h

44 lines
1.1 KiB
C
Raw Normal View History

#ifndef JEMALLOC_INTERNAL_PA_H
#define JEMALLOC_INTERNAL_PA_H
2020-03-09 04:08:15 +08:00
#include "jemalloc/internal/ecache.h"
#include "jemalloc/internal/edata_cache.h"
/*
* The page allocator; responsible for acquiring pages of memory for
* allocations.
*/
2020-03-09 04:08:15 +08:00
typedef struct pa_shard_stats_s pa_shard_stats_t;
struct pa_shard_stats_s {
/* VM space had to be leaked (undocumented). Normally 0. */
atomic_zu_t abandoned_vm;
};
2020-03-09 01:35:56 +08:00
typedef struct pa_shard_s pa_shard_t;
struct pa_shard_s {
/*
* Collections of extents that were previously allocated. These are
* used when allocating extents, in an attempt to re-use address space.
*
* Synchronization: internal.
*/
ecache_t ecache_dirty;
ecache_t ecache_muzzy;
ecache_t ecache_retained;
2020-03-09 02:41:19 +08:00
/* The source of edata_t objects. */
edata_cache_t edata_cache;
2020-03-09 04:08:15 +08:00
2020-03-09 04:47:02 +08:00
/* The grow info for the retained ecache. */
ecache_grow_t ecache_grow;
2020-03-09 04:08:15 +08:00
pa_shard_stats_t *stats;
2020-03-09 01:35:56 +08:00
};
2020-03-09 02:19:41 +08:00
/* Returns true on error. */
2020-03-09 04:08:15 +08:00
bool pa_shard_init(tsdn_t *tsdn, pa_shard_t *shard, base_t *base, unsigned ind,
pa_shard_stats_t *stats);
2020-03-09 02:19:41 +08:00
#endif /* JEMALLOC_INTERNAL_PA_H */