Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
Flags
safe-html, strict-same
Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
The <<<ref_monotonic_resource>> optimizes this memory allocation pattern by allocating increasingly large blocks of global memory internally and parceling those blocks out in smaller pieces to fulfill allocation requests. It has a trivial deallocate function. The monotonic resource does not actually deallocate memory until the resource is destroyed. Thus, it is ideally suited for the use-case where JSON is parsed, and the resulting value is then inspected but not modified.> 通过在内部分配逐渐增大的全局内存块,并将这些块切分为更小的部分以满足分配请求,从而优化了该内存分配模式。它具有平凡的 deallocate 函数,实际上不会释放内存,直到该资源被销毁。因此,它非常适合用于解析 JSON 后仅检查结果值而不对其进行修改的场景。</ref_monotonic_resource>