You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
server(JSON): Remove parse method which used default heap
There were two parse methods, one which used the default heap and the
other which used a thread local mi heap.
The former one is removed here. The reason is to prepare for using a
stateless allocator.
The allocator is part of the type of the json object. A stateless
allocator must not hold state of its own and simply forward requests to
a memory resource pointer accessed from a static storage.
In such a model, having two memory resources does not work because two
allocators using different heaps are not interchangeable.
It is possible to use two different types, but in that case the json
object types become different, and it becomes impossible to work with
them transparently.
The switch to mi heap everywhere can cause one problem during
accounting. The JSONAutoUpdater class uses memory usage before and after
parsing to figure out how many bytes are used by a given object. If the
objects parsed by the method which is removed in this PR are
interspersed with JSONAutoUpdater, then this can cause a problem with
accounting.
At present there are no such cases in the code.
Signed-off-by: Abhijat Malviya <[email protected]>
0 commit comments