Skip to content

Latest commit

 

History

History
48 lines (48 loc) · 2.39 KB

flow.md

File metadata and controls

48 lines (48 loc) · 2.39 KB
         +---------------------------------------+
         |                                       |
         |           Start Execution             |
         |                                       |
         +---------------------------------------+
                        |
                        v
         +---------------------------------------+
         |                                       |
         |       Initialize IS_INIT_MALLOC       |
         |                                       |
         +------------------|--------------------+
                            |
                            v
   +----------------------------------------------+
   |                                              |
   |      IS_INIT_MALLOC == true? (Initialized)   |
   |                                              |
   +------------------|--------------------+------+
                      |                    |
                      v                    v
         +---------------------------------------+
         |                                       |
         |         Allocate Memory (malloc)      |
         |                                       |
         +------------------|--------------------+
                            |
                            v
   +----------------------------------------------+
   |                                              |
   |      Size <= MAX_BYTE? (Allocate on Heap)    |
   |                                              |
   +------------------|--------------------+------+
                      |                    |
                      v                    v
         +---------------------------------------+
         |                                       |
         |      Find and Allocate Chunk          |
         |         (find_chunk function)         |
         |                                       |
         +------------------|--------------------+
                            |
                            v
         +---------------------------------------+
         |                                       |
         |      Return Allocated Memory          |
         |                                       |
         +---------------------------------------+