内存领域和内存分配器之间有什么区别? [英] What's the difference between a memory arena and a memory allocator?

查看:89
本文介绍了内存领域和内存分配器之间有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个语义问题,而不是编码问题.

This is more a semantic question than a coding question....

内存领域和内存分配器之间有什么区别?

What's the difference between a memory arena and a memory allocator?

我正在C ++中工作,我看到一些使用诸如内存竞技场",内存分配器"之类的概念的内存管理库,有时两者都在同一个库中.

I'm working in C++ and I'm seeing some memory management libs using concepts like "memory arena", "memory allocator" and sometimes both in the same lib.

我知道什么是分配器;如果只是分配器的另一个词,我只是不确定内存领域是什么.

I know what an allocator is; I'm just not sure what a memory arena is if it's not just another word for allocator.

推荐答案

内存竞技场"通常是指较大的内存块(或内存块集合),从中分配了较小的内存块. "pool"(池)一词也常用于此类事情.

"Memory arena" typically means a large lump (or collection of lumps) of memory from which smaller lumps are allocated. The word "pool" is also commonly used for such a thing.

内存分配器"通常是指确定如何从舞台上分配内存的软件.

"Memory allocator" typically means the software that determines how to allocate memory from an arena.

这篇关于内存领域和内存分配器之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆