profalloc correct arena size
This commit is contained in:
parent
af4391300c
commit
5a14818f88
@ -54,7 +54,7 @@ void arena_release(struct arena *arena)
|
|||||||
ASAN_UNPOISON(arena, arena->committed + ARENA_HEADER_SIZE);
|
ASAN_UNPOISON(arena, arena->committed + ARENA_HEADER_SIZE);
|
||||||
__prof;
|
__prof;
|
||||||
__proffree(arena);
|
__proffree(arena);
|
||||||
gstat_sub(GSTAT_MEMORY_COMMITTED, arena->committed);
|
gstat_sub(GSTAT_MEMORY_COMMITTED, arena->committed + ARENA_HEADER_SIZE);
|
||||||
gstat_sub(GSTAT_MEMORY_RESERVED, arena->reserved);
|
gstat_sub(GSTAT_MEMORY_RESERVED, arena->reserved);
|
||||||
gstat_sub(GSTAT_NUM_ARENAS, 1);
|
gstat_sub(GSTAT_NUM_ARENAS, 1);
|
||||||
sys_memory_release(arena);
|
sys_memory_release(arena);
|
||||||
@ -93,7 +93,7 @@ void *arena_push_bytes_no_zero(struct arena *arena, u64 size, u64 align)
|
|||||||
arena->committed += commit_bytes;
|
arena->committed += commit_bytes;
|
||||||
gstat_add(GSTAT_MEMORY_COMMITTED, commit_bytes);
|
gstat_add(GSTAT_MEMORY_COMMITTED, commit_bytes);
|
||||||
__proffree(arena);
|
__proffree(arena);
|
||||||
__profalloc(arena, arena->committed + commit_bytes + ARENA_HEADER_SIZE);
|
__profalloc(arena, arena->committed + ARENA_HEADER_SIZE);
|
||||||
ASAN_POISON(commit_address, commit_bytes);
|
ASAN_POISON(commit_address, commit_bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3020,29 +3020,27 @@ INTERNAL SYS_THREAD_ENTRY_POINT_FUNC_DEF(evictor_thread_entry_point, arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Process releases */
|
/* Process releases */
|
||||||
if (!shutdown) {
|
for (u32 i = 0; i < num_fenced_releases; ++i) {
|
||||||
__profscope(Release);
|
__profscope(Release);
|
||||||
for (u32 i = 0; i < num_fenced_releases; ++i) {
|
struct fenced_release_data *fr = &fenced_releases[i];
|
||||||
struct fenced_release_data *fr = &fenced_releases[i];
|
switch (fr->kind) {
|
||||||
switch (fr->kind) {
|
default:
|
||||||
default:
|
{
|
||||||
{
|
/* Unknown handle type */
|
||||||
/* Unknown handle type */
|
ASSERT(false);
|
||||||
ASSERT(false);
|
} break;
|
||||||
} break;
|
|
||||||
|
|
||||||
case FENCED_RELEASE_KIND_RESOURCE:
|
case FENCED_RELEASE_KIND_RESOURCE:
|
||||||
{
|
{
|
||||||
struct dx12_resource *resource = (struct dx12_resource *)fr->ptr;
|
struct dx12_resource *resource = (struct dx12_resource *)fr->ptr;
|
||||||
dx12_resource_release_now(resource);
|
dx12_resource_release_now(resource);
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case FENCED_RELEASE_KIND_PIPELINE:
|
case FENCED_RELEASE_KIND_PIPELINE:
|
||||||
{
|
{
|
||||||
struct pipeline *pipeline = (struct pipeline *)fr->ptr;
|
struct pipeline *pipeline = (struct pipeline *)fr->ptr;
|
||||||
pipeline_release_now(pipeline);
|
pipeline_release_now(pipeline);
|
||||||
} break;
|
} break;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user