On 10/1/16 7:34 PM, Tomas Vondra wrote:
+    /* otherwise add it to the proper freelist bin */
Looks like something went missing... :)


Ummm? The patch contains this:

+    /* otherwise add it to the proper freelist bin */
+    if (set->freelist[block->nfree])
+        set->freelist[block->nfree]->prev = block;
+
+    block->next = set->freelist[block->nfree];
+    set->freelist[block->nfree] = block;

Which does exactly the thing it should do. Or what is missing?

What's confusing is the "otherwise" right at the beginning of the function:

+static void
+add_to_freelist(Slab set, SlabBlock block)
+{
+       /* otherwise add it to the proper freelist bin */
+       if (set->freelist[block->nfree])
+               set->freelist[block->nfree]->prev = block;
+
+       block->next = set->freelist[block->nfree];
+       set->freelist[block->nfree] = block;
+}

Otherwise what? What's the other option?


(Haven't looked at the newer patch, so maybe this isn't an issue anymore.)
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)   mobile: 512-569-9461


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to