Skip to content

Commit 7cefcdf

Browse files
committed
Merge remote-tracking branch 'intorr/intorr_dev' into xd_dev
2 parents ac52f85 + 0b190db commit 7cefcdf

File tree

21 files changed

+400
-721
lines changed

21 files changed

+400
-721
lines changed

src/Layers/xrRender/DetailManager.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,18 +96,18 @@ CDetailManager::CDetailManager() : xrc("detail manager")
9696
dm_cache_size = dm_current_cache_size;
9797
dm_fade = dm_current_fade;
9898
ps_r__Detail_density = ps_current_detail_density;
99-
cache_level1 = (CacheSlot1**)Memory.mem_alloc(dm_cache1_line * sizeof(CacheSlot1*));
99+
cache_level1 = (CacheSlot1**)xr_malloc(dm_cache1_line * sizeof(CacheSlot1*));
100100
for (u32 i = 0; i < dm_cache1_line; ++i)
101101
{
102-
cache_level1[i] = (CacheSlot1*)Memory.mem_alloc(dm_cache1_line * sizeof(CacheSlot1));
102+
cache_level1[i] = (CacheSlot1*)xr_malloc(dm_cache1_line * sizeof(CacheSlot1));
103103
for (u32 j = 0; j < dm_cache1_line; ++j)
104104
new(&cache_level1[i][j]) CacheSlot1();
105105
}
106-
cache = (Slot***)Memory.mem_alloc(dm_cache_line * sizeof(Slot**));
106+
cache = (Slot***)xr_malloc(dm_cache_line * sizeof(Slot**));
107107
for (u32 i = 0; i < dm_cache_line; ++i)
108-
cache[i] = (Slot**)Memory.mem_alloc(dm_cache_line * sizeof(Slot*));
108+
cache[i] = (Slot**)xr_malloc(dm_cache_line * sizeof(Slot*));
109109

110-
cache_pool = (Slot *)Memory.mem_alloc(dm_cache_size * sizeof(Slot));
110+
cache_pool = (Slot *)xr_malloc(dm_cache_size * sizeof(Slot));
111111

112112
for (u32 i = 0; i < dm_cache_size; ++i)
113113
new(&cache_pool[i]) Slot();
@@ -124,19 +124,19 @@ CDetailManager::~CDetailManager()
124124
#ifdef DETAIL_RADIUS
125125
for (u32 i = 0; i < dm_cache_size; ++i)
126126
cache_pool[i].~Slot();
127-
Memory.mem_free(cache_pool);
127+
xr_free(cache_pool);
128128

129129
for (u32 i = 0; i < dm_cache_line; ++i)
130-
Memory.mem_free(cache[i]);
131-
Memory.mem_free(cache);
130+
xr_free(cache[i]);
131+
xr_free(cache);
132132

133133
for (u32 i = 0; i < dm_cache1_line; ++i)
134134
{
135135
for (u32 j = 0; j < dm_cache1_line; ++j)
136136
cache_level1[i][j].~CacheSlot1();
137-
Memory.mem_free(cache_level1[i]);
137+
xr_free(cache_level1[i]);
138138
}
139-
Memory.mem_free(cache_level1);
139+
xr_free(cache_level1);
140140
#endif
141141
}
142142
/*

0 commit comments

Comments
 (0)