3 ms·
>> Calling a memory analysis "naive" because it bases itself only on the system allocation/deallocation routines is just silly << No, it's being accurate. Repo
by ajg1977 17y ago
>> Calling a memory analysis "naive" because it bases itself only on the system allocation/deallocation routines is just silly <<
No, it's being accurate. Reporting leaks based on mismatched alloc/dealloc system calls is a fair starting point, but is still a naive technique.
For example detecting resource leaks can either be done by instrumenting the program itself, or tracking calls to the underlying OS routines. If the tracking was based on the program then everything would be peachy since the create/free calls match. But it's not, it uses system calls and seemingly discounts the potential for resources not to live beyond their use in the program. And that's naive.
>> Any sufficiently advanced cache is indistinguishable from a memory leak, that's sort of the point. <<
I suppose that depends on your definition of a leak. Mine is "no longer referenced", which a cached item clearly is.