Add upb_Arena_SpaceAllocated function#729
Add upb_Arena_SpaceAllocated function#729copybara-service[bot] merged 1 commit intoprotocolbuffers:mainfrom
Conversation
|
This looks good. We should also expose a |
1a70918 to
ca423cb
Compare
Done. |
fa81616 to
84e8f0c
Compare
84e8f0c to
c144cc6
Compare
| bool upb_Arena_Fuse(upb_Arena* a, upb_Arena* b); | ||
| void* _upb_Arena_SlowMalloc(upb_Arena* a, size_t size); | ||
| size_t upb_Arena_SpaceAllocated(upb_Arena *arena); | ||
| uint_32_t upb_Arena_DebugRefCount(upb_Arena *arena); |
There was a problem hiding this comment.
Same issue here.
Are you able to run the tests? If you install Bazel you should be able to run:
$ bazel test :all
c144cc6 to
7980b53
Compare
|
@haberman apologies for not double checking, should be good to go now. |
|
Would you be able to pull the latest changes from |
7980b53 to
f127673
Compare
Ref: protocolbuffers/protobuf#10291 Ruby types defined though native extensions should register a function that report their memory footprint in bytes. This feature is used by various memory profiling tools.
f127673 to
2341741
Compare
|
@haberman rebased |
|
Thanks! |
Ref: protocolbuffers/protobuf#10291
Ruby types defined though native extensions should register
a function that report their memory footprint in bytes.
This feature is used by various memory profiling tools.
As suggested by @haberman.
NB: the implementation is a bit simpler than what we had in protocolbuffers/protobuf#10291, here we return the arena allocated size, but we don't care about fused arenas. I think dividing by the number of fused arena is an implementation detail of the Ruby extension.