- Timestamp:
- Apr 16, 2010 7:09:47 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/misc.c
r28175 r28394 217 217 Assert(it->magic == ITEM_MAGIC); 218 218 zone = it->zone; 219 /* check bourder magic */ 220 Assert((*(uint32_t *)(((uint8_t *)&it[1]) + zone->size) == 0xabadbabe)); 219 221 RTCritSectEnter(&zone->csZone); 220 222 Assert(zone->magic == ZONE_MAGIC); … … 278 280 struct item *it; 279 281 zone->max_items = max; 280 zone->area = RTMemAllocZ(max * (sizeof(struct item) + zone->size ));282 zone->area = RTMemAllocZ(max * (sizeof(struct item) + zone->size + sizeof(uint32_t))); 281 283 for (; i < max; ++i) 282 284 { 283 it = (struct item *)(((uint8_t *)zone->area) + i*(sizeof(struct item) + zone->size ));285 it = (struct item *)(((uint8_t *)zone->area) + i*(sizeof(struct item) + zone->size + sizeof(uint32_t))); 284 286 it->magic = ITEM_MAGIC; 285 287 it->zone = zone; 288 *(uint32_t *)(((uint8_t *)&it[1]) + zone->size) = 0xabadbabe; 286 289 LIST_INSERT_HEAD(&zone->free_items, it, list); 287 290 }
Note:
See TracChangeset
for help on using the changeset viewer.