IMHO the way to implement this is to add a function to
libmss that could be called in newStr to say that current
function is a memory-allocation function and should be
tracked by MSS.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
>But newStr boils down to strdup, malloc or new, and that
gets logged? What's
>> wrong with that?
The wrong thing is that I get a lot of allocations that
claims to be calls from
newStr, but it doesn't really help me to know where is this
allocation done. I
need to know what code called newStr (it calls new[]).
So, if we have newStr wrapper that logs it all gets solved.
Is the same as with strdup, why it logs something if it
finally calls malloc?
simple: because you want to know who called strdup and not
get llogs about
allocations from strdup.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=24239
IMHO the way to implement this is to add a function to
libmss that could be called in newStr to say that current
function is a memory-allocation function and should be
tracked by MSS.
Logged In: YES
user_id=24239
From e-mail discussion with SET:
>But newStr boils down to strdup, malloc or new, and that
gets logged? What's
>> wrong with that?
The wrong thing is that I get a lot of allocations that
claims to be calls from
newStr, but it doesn't really help me to know where is this
allocation done. I
need to know what code called newStr (it calls new[]).
So, if we have newStr wrapper that logs it all gets solved.
Is the same as with strdup, why it logs something if it
finally calls malloc?
simple: because you want to know who called strdup and not
get llogs about
allocations from strdup.