Github user bryancall commented on a diff in the pull request: https://github.com/apache/trafficserver/pull/489#discussion_r53533502 --- Diff: lib/ts/ink_memory.cc --- @@ -209,6 +210,46 @@ ats_mlock(caddr_t addr, size_t len) return res; } +void * +ats_track_malloc(size_t size, uint64_t *stat) +{ + // pad with 8 bytes to add allocation size + void *ptr = malloc(size + 8); + memcpy(ptr, &size, 8); + ink_atomic_increment(stat, size); + return (void *)((uint64_t)ptr + 8); +} --- End diff -- I am planning on having and option for `ats_malloc` to call the track functions in the future. Still thinking about how to do it cleanly.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---