utilities/standaloneallocator/README.txt
changeset 16 3c88a81ff781
equal deleted inserted replaced
14:6aeb7a756187 16:3c88a81ff781
       
     1 ------------------------------
       
     2 This is the custom memory allocator for use with QtWebkit based killer apps for Symbian/S60. 
       
     3 ------------------------------
       
     4 
       
     5 Major features: 
       
     6 - faster than Symbian RHeap. O(1) operations vs. O(n) 
       
     7 - more space efficient for smaller allocations (i.e lower system RAM usage)
       
     8 - switches at run-time between 1 of 3 allocation algorithms based on requested alloc size
       
     9 
       
    10 * How Symbian OS process startup works: 
       
    11 (from http://developer.symbian.org/wiki/index.php/Symbian_OS_Internals/3._Threads,_Processes_and_Libraries ) 
       
    12  * Process entry point (__E32Startup) -> RunThread() -> UserHeap::SetupThreadHeap(). 
       
    13  * SetupThreadHeap() is where we initialize our custom (heap) allocator.
       
    14  * If this is first thread in the process, constructors for static data are called, followed by E32Main(). 
       
    15  * If NOT first thread in process, the thread's entry point is called straight away. 
       
    16  * NOTE: UserHeap::SetupThreadHeap() is called BEFORE static data is initialized
       
    17  
       
    18  
       
    19 Debugging support:
       
    20 
       
    21 * To use standard Symbian/S60 memory analysis tools, comment out the call to UserHeap::SetupThreadHeap() and recompile the library. 
       
    22   Then relink your application (.exe) with the updated library. This will make RHeap your default allocator once again. 
       
    23 
       
    24 (from Shane Kearns) 
       
    25 * With a 9.4 (5.0) or later RND environment, you can use BTRACE by defining the required BTRACE macros (in the source, commented out).
       
    26   This emits the same BTRACE entries as the default allocator, so you can do memory leak analysis using existing tools based on BTRACE.
       
    27   For example, the promising but cancelled SAW. (which is still available inside nokia). 
       
    28 * Memory analysis tools based on dumping the heap to a file and doing post-mortem analysis won't work unless specifically designed for this allocator.
       
    29 
       
    30 
       
    31 
       
    32