File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5
- refs/heads/try: d23cd8f52fbfb41844b27c5e65cb620c34c7af59
5
+ refs/heads/try: db62154062534a61b618f46d4c8715479ce150af
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
Original file line number Diff line number Diff line change @@ -60,7 +60,6 @@ void memory_region::free(void *mem) {
60
60
61
61
void *
62
62
memory_region::realloc (void *mem, size_t orig_size) {
63
- if (_synchronized) { _lock.lock (); }
64
63
if (!mem) {
65
64
add_alloc ();
66
65
}
@@ -79,6 +78,7 @@ memory_region::realloc(void *mem, size_t orig_size) {
79
78
# endif
80
79
81
80
# if RUSTRT_TRACK_ALLOCATIONS >= 2
81
+ if (_synchronized) { _lock.lock (); }
82
82
if (_allocation_list[newMem->index ] != alloc) {
83
83
printf (" at index %d, found %p, expected %p\n " ,
84
84
alloc->index , _allocation_list[alloc->index ], alloc);
@@ -91,9 +91,9 @@ memory_region::realloc(void *mem, size_t orig_size) {
91
91
// printf("realloc: stored %p at index %d, replacing %p\n",
92
92
// newMem, index, mem);
93
93
}
94
+ if (_synchronized) { _lock.unlock (); }
94
95
# endif
95
96
96
- if (_synchronized) { _lock.unlock (); }
97
97
return get_data (newMem);
98
98
}
99
99
You can’t perform that action at this time.
0 commit comments