mirror of
https://github.com/gperftools/gperftools
synced 2025-01-18 21:01:08 +00:00
don't use arg-ful constructor attribute for early nallocx test
101 is not very early anyways and arg-ful constructor attribute is only supported since gcc 4.3 (and e.g. rhel 5's compiler fails to compile it). So there seems to be very little value trying to ask for priority of 101.
This commit is contained in:
parent
5346b8a4de
commit
07a124d8c1
@ -1079,14 +1079,7 @@ struct GlobalNallocx {
|
|||||||
|
|
||||||
#if defined(__GNUC__)
|
#if defined(__GNUC__)
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
|
||||||
// llvm-gcc on older osex that I have access to, doesn't like arg-ful
|
|
||||||
// constructor attribute.
|
|
||||||
static void check_global_nallocx() __attribute__((constructor));
|
static void check_global_nallocx() __attribute__((constructor));
|
||||||
#else
|
|
||||||
// 101 is the max user priority.
|
|
||||||
static void check_global_nallocx() __attribute__((constructor(101)));
|
|
||||||
#endif
|
|
||||||
static void check_global_nallocx() { CHECK_GT(nallocx(99, 0), 99); }
|
static void check_global_nallocx() { CHECK_GT(nallocx(99, 0), 99); }
|
||||||
|
|
||||||
#endif // __GNUC__
|
#endif // __GNUC__
|
||||||
|
Loading…
Reference in New Issue
Block a user