Created
September 20, 2018 09:05
-
-
Save holmeshe/e8766723dd3e870f0d1fc543266971d0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static void do_slabs_free(void *ptr, const size_t size, unsigned int id) { | |
| slabclass_t *p; | |
| item *it; | |
| ... | |
| p = &slabclass[id]; | |
| it = (item *)ptr; | |
| it->it_flags = ITEM_SLABBED; // scr: ---------------> 1) | |
| it->slabs_clsid = 0; | |
| it->prev = 0; // scr: ------------------------------> 2) | |
| it->next = p->slots; | |
| if (it->next) it->next->prev = it; | |
| p->slots = it; | |
| p->sl_curr++; // scr: ------------------------------> 3) | |
| p->requested -= size; | |
| return; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment