[TxMt] Re: Memory leak?
Allan Odgaard
mailinglist at textmate.org
Tue Apr 28 15:00:38 UTC 2015
On 15 Apr 2015, at 1:28, Edward K. Chew wrote:
> Thanks. I was thinking there is another possibility too. The assembler
> I use generates a listing file. It's possible I might have had that
> open in TextMate when I ran the assembler again which would overwrite
> the open file. Could that lead to some kind of racing condition maybe?
It shouldn’t, but there could be an issue where a file is appended
to/overwritten faster than TextMate can reload it (the file monitoring
and reload is an area that I would like to improve upon).
As for potential memory leaks, the best way to measure this is to run
“leaks TextMate” in a terminal; when TextMate allocates memory, it
goes via malloc(3) that allocates pages from the OS and manages these.
So the amount of memory allocated from the OS (shown in Activity
Monitor) will be higher than actal malloc’ed memory, as it’ll be
rounded up to full page sizes, and while TextMate may free memory
totalling more than a page, it might not be possible to give back a page
to the OS due to fragmentation or allocator implementation details.
More information about the textmate
mailing list