- struct allocinfo_s *next = container_of_or_null(
- info->node.next, struct allocinfo_s, node);
- if (next && next->allocend == info->data)
- next->allocend = info->allocend;
- hlist_del(&info->node);
+ u32 detail_addr = alloc_new(&ZoneTmpHigh, sizeof(struct allocdetail_s)
+ , MALLOC_MIN_ALIGN, &temp->detailinfo);
+ if (!detail_addr) {
+ detail_addr = alloc_new(&ZoneTmpLow, sizeof(struct allocdetail_s)
+ , MALLOC_MIN_ALIGN, &temp->detailinfo);
+ if (!detail_addr) {
+ warn_noalloc();
+ return NULL;
+ }
+ }
+ struct allocdetail_s *detail = memremap(detail_addr, sizeof(*detail));
+
+ // Fill final 'detail' allocation from data in 'temp'
+ memcpy(detail, temp, sizeof(*detail));
+ hlist_replace(&temp->detailinfo.node, &detail->detailinfo.node);
+ hlist_replace(&temp->datainfo.node, &detail->datainfo.node);
+ return detail;