I have previously been told that a sign that some application has a memory leak is that `kernel_task` has a large memory footprint, commonly on the order of gigabytes. If an awry `kext` was causing this memory usage, we would expect to see a discrepancy between the allocated memory and those expected to be allocated, i.e. 

    diff <(kextstat|tr -s ' ' | cut -d ' ' -f 5) <(kextstat| tr -s ' ' | cut -d ' ' -f 6) 

would return something other than the words 'Wired' and 'Name'. 

Whilst writing my thesis, I have noticed that changing a pdf whilst it is open in Preview often causes bad things to happen: occasionally, the memory usage of `kernel_task` can grow to around eight gigabytes, or more. **If I kill preview, it returns to normal, instantly**. So, obviously something is wrong -- and Preview is leaking memory under these conditions.

So, my question is this: if *I* know that a process has leaked ram via a sudden and unexpected increase in the footprint of `kernel_task`, why can't *OS X* know that something has gone wrong. If killing Preview restores my missing `malloc()`'d memory, why *doesn't* Darwin do garbage collection automagically for me? 

Do I have a fundamental misunderstanding of how memory management works?