[ 
https://issues.apache.org/jira/browse/TS-4212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15156326#comment-15156326
 ] 

ASF GitHub Bot commented on TS-4212:
------------------------------------

Github user jpeach commented on the pull request:

    https://github.com/apache/trafficserver/pull/489#issuecomment-186952049
  
    Are you sure there isn't a better way to do this?
    
    - it is fairly ugly
    - it duplicates the allocation size tracking the allocator is already doing
    - it gets the alignment wrong in some cases (ie. you won't be 16 byte 
aligned any more).
    
    [glibc](http://man7.org/linux/man-pages/man3/malloc_usable_size.3.html) and 
[jemalloc](https://www.freebsd.org/cgi/man.cgi?query=malloc_usable_size) both 
provide ``malloc_usable_size``, which seems like it will tell you what you need 
to know here.


> Add option to track memory allocation with OpenSSL
> --------------------------------------------------
>
>                 Key: TS-4212
>                 URL: https://issues.apache.org/jira/browse/TS-4212
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Core, SSL
>            Reporter: Bryan Call
>             Fix For: 6.2.0
>
>
> For example:
> {code}
> [bcall@l1 ~]$ sudo traffic_line -s proxy.config.res_track_memory -v 2
> [bcall@l1 ~]$ sudo kill -sigusr1 $(pidof traffic_server); tail traffic.out
> Total Allocated      | Total Freed          | Currently Allocated  | Type
> ---------------------|----------------------|----------------------|----------------------
>          18437960662 |          17181254510 |           1256706152 | SSL 
> Allocated Memory
> ---------------------|----------------------|----------------------|----------------------
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to