File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -128,14 +128,12 @@ class StackAllocator {
128
128
// / Clear the fake metadata pointer. Call before freeing so that leftover
129
129
// / heap garbage doesn't have slab metadata pointers in it.
130
130
void clearMetadata () {
131
- // Use memset_s or explicit_bzero where available . Fall back to a plain
132
- // assignment on unknown platforms. This is not necessary for correctness,
133
- // just as an aid to analysis tools, so it's OK if the fallback gets
134
- // optimized out.
131
+ // Use memset_s on Apple platforms . Fall back to a plain
132
+ // assignment on other platforms. This is not necessary for
133
+ // correctness, just as an aid to analysis tools, so it's OK if
134
+ // the fallback gets optimized out.
135
135
#if defined(__APPLE__)
136
136
memset_s (&metadata, sizeof (metadata), 0 , sizeof (metadata));
137
- #elif defined(__linux__)
138
- explicit_bzero (&metadata, sizeof (metadata));
139
137
#else
140
138
metadata = 0 ;
141
139
#endif
You can’t perform that action at this time.
0 commit comments