Check-in Number:
|
1591 | |
Date: |
2002-Jan-19 14:21:47 (local)
2002-Jan-19 13:21:47 (UTC) |
User: | rse |
Branch: | |
Comment: |
add again support for freeing segments |
Tickets: |
|
Inspections: |
|
Files: |
|
ossp-pkg/act/act_grid.c 1.7 -> 1.8
--- act_grid.c 2002/01/19 13:18:01 1.7
+++ act_grid.c 2002/01/19 13:21:47 1.8
@@ -327,18 +327,11 @@
ACT_LIST_INSERT_HEAD(&seg->gs_tile_free_list, tile, gt_link);
seg->gs_tile_free_num++;
- /* free last segment if it is empty and if segment
- before (this one here) is now also empty */
-#if 0
- if ( seg->gs_tile_num == seg->gs_tile_free_num
- && (seg_last = seg->gs_link) != NULL ) {
- if ( seg_last->gs_tile_num == seg_last->gs_tile_free_num
- && seg_last->gs_link == NULL ) {
- act_mem_free_ctx(grid->g_ctx, seg_last);
- seg->gs_link = NULL;
- }
+ /* free segment if it is now empty */
+ if (seg->gs_tile_num == seg->gs_tile_free_num) {
+ ACT_RING_REMOVE(seg, gs_link);
+ act_mem_free_ctx(grid->g_ctx, seg);
}
-#endif
return ACT_OK;
}
|
|