115 | 6.76k | } _Z5AllocI4ListIiEJEEPT_DpOT0_ Line | Count | Source | 78 | 14 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 14 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 14 | "Expected no padding"); | 91 | | | 92 | 14 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 14 | #if MARK_SWEEP | 96 | 14 | int obj_id; | 97 | 14 | int pool_id; | 98 | 14 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 14 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 14 | #if MARK_SWEEP | 104 | 14 | header->obj_id = obj_id; | 105 | 14 | #ifndef NO_POOL_ALLOC | 106 | 14 | header->pool_id = pool_id; | 107 | 14 | #endif | 108 | 14 | #endif | 109 | 14 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 14 | memset(obj, 0, sizeof(T)); | 114 | 14 | return new (obj) T(std::forward<Args>(args)...); | 115 | 14 | } |
_Z5AllocIN5mylib5CFileEJRP8_IO_FILEEEPT_DpOT0_ Line | Count | Source | 78 | 3 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 3 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 3 | "Expected no padding"); | 91 | | | 92 | 3 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 3 | #if MARK_SWEEP | 96 | 3 | int obj_id; | 97 | 3 | int pool_id; | 98 | 3 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 3 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 3 | #if MARK_SWEEP | 104 | 3 | header->obj_id = obj_id; | 105 | 3 | #ifndef NO_POOL_ALLOC | 106 | 3 | header->pool_id = pool_id; | 107 | 3 | #endif | 108 | 3 | #endif | 109 | 3 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 3 | memset(obj, 0, sizeof(T)); | 114 | 3 | return new (obj) T(std::forward<Args>(args)...); | 115 | 3 | } |
_Z5AllocIN14asdl_generated17arith_expr__ConstEJiEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
Unexecuted instantiation: _Z5AllocIN14asdl_generated17arith_expr__ConstEJRiEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN5iolib10SignalSafeEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI7OSErrorJRiEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI10IndexErrorJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI7IOErrorJRiEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI17KeyboardInterruptJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI10ValueErrorJEEPT_DpOT0_ _Z5AllocI4ListIP6BigStrEJEEPT_DpOT0_ Line | Count | Source | 78 | 39 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 39 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 39 | "Expected no padding"); | 91 | | | 92 | 39 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 39 | #if MARK_SWEEP | 96 | 39 | int obj_id; | 97 | 39 | int pool_id; | 98 | 39 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 39 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 39 | #if MARK_SWEEP | 104 | 39 | header->obj_id = obj_id; | 105 | 39 | #ifndef NO_POOL_ALLOC | 106 | 39 | header->pool_id = pool_id; | 107 | 39 | #endif | 108 | 39 | #endif | 109 | 39 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 39 | memset(obj, 0, sizeof(T)); | 114 | 39 | return new (obj) T(std::forward<Args>(args)...); | 115 | 39 | } |
_Z5AllocIN7classes10TextOutputEJRPN5mylib6WriterEEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
_Z5AllocIN7classes4BaseEJDnEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
_Z5AllocIN7classes8DerivedIEJDniEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
_Z5AllocIN7classes9DerivedSSEJDnRP6BigStrS4_EEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
_Z5AllocIN5mylib9BufWriterEJEEPT_DpOT0_ Line | Count | Source | 78 | 36 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 36 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 36 | "Expected no padding"); | 91 | | | 92 | 36 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 36 | #if MARK_SWEEP | 96 | 36 | int obj_id; | 97 | 36 | int pool_id; | 98 | 36 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 36 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 36 | #if MARK_SWEEP | 104 | 36 | header->obj_id = obj_id; | 105 | 36 | #ifndef NO_POOL_ALLOC | 106 | 36 | header->pool_id = pool_id; | 107 | 36 | #endif | 108 | 36 | #endif | 109 | 36 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 36 | memset(obj, 0, sizeof(T)); | 114 | 36 | return new (obj) T(std::forward<Args>(args)...); | 115 | 36 | } |
Unexecuted instantiation: _Z5AllocIN7classes10TextOutputEJRPN5mylib9BufWriterEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN7classes4NodeEJDniEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN7classes4NodeEJRPS1_RiEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN7classes8DerivedIEJRPNS0_4BaseERiEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN7classes9DerivedSSEJRPNS0_8DerivedIERP6BigStrS7_EEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN7classes4BaseEJRPNS0_9DerivedSSEEEPT_DpOT0_ _Z5AllocI6Tuple2IiP6BigStrEJiRS2_EEPT_DpOT0_ Line | Count | Source | 78 | 5 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 5 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 5 | "Expected no padding"); | 91 | | | 92 | 5 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 5 | #if MARK_SWEEP | 96 | 5 | int obj_id; | 97 | 5 | int pool_id; | 98 | 5 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 5 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 5 | #if MARK_SWEEP | 104 | 5 | header->obj_id = obj_id; | 105 | 5 | #ifndef NO_POOL_ALLOC | 106 | 5 | header->pool_id = pool_id; | 107 | 5 | #endif | 108 | 5 | #endif | 109 | 5 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 5 | memset(obj, 0, sizeof(T)); | 114 | 5 | return new (obj) T(std::forward<Args>(args)...); | 115 | 5 | } |
_Z5AllocIN10containers5PointEJiiEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
_Z5AllocI4DictIP6BigStriEJEEPT_DpOT0_ Line | Count | Source | 78 | 4 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 4 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 4 | "Expected no padding"); | 91 | | | 92 | 4 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 4 | #if MARK_SWEEP | 96 | 4 | int obj_id; | 97 | 4 | int pool_id; | 98 | 4 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 4 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 4 | #if MARK_SWEEP | 104 | 4 | header->obj_id = obj_id; | 105 | 4 | #ifndef NO_POOL_ALLOC | 106 | 4 | header->pool_id = pool_id; | 107 | 4 | #endif | 108 | 4 | #endif | 109 | 4 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 4 | memset(obj, 0, sizeof(T)); | 114 | 4 | return new (obj) T(std::forward<Args>(args)...); | 115 | 4 | } |
Unexecuted instantiation: _Z5AllocI8KeyErrorJEEPT_DpOT0_ _Z5AllocI4DictIP6BigStriEJSt16initializer_listIS2_ES4_IiEEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
_Z5AllocI4DictIP6BigStrS2_EJEEPT_DpOT0_ Line | Count | Source | 78 | 5 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 5 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 5 | "Expected no padding"); | 91 | | | 92 | 5 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 5 | #if MARK_SWEEP | 96 | 5 | int obj_id; | 97 | 5 | int pool_id; | 98 | 5 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 5 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 5 | #if MARK_SWEEP | 104 | 5 | header->obj_id = obj_id; | 105 | 5 | #ifndef NO_POOL_ALLOC | 106 | 5 | header->pool_id = pool_id; | 107 | 5 | #endif | 108 | 5 | #endif | 109 | 5 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 5 | memset(obj, 0, sizeof(T)); | 114 | 5 | return new (obj) T(std::forward<Args>(args)...); | 115 | 5 | } |
_Z5AllocIN10containers13HasDictMemberEJEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
_Z5AllocIN12control_flow10ParseErrorEJRP6BigStrEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
_Z5AllocI6Tuple2IP6BigStriEJRS2_iEEPT_DpOT0_ Line | Count | Source | 78 | 3 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 3 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 3 | "Expected no padding"); | 91 | | | 92 | 3 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 3 | #if MARK_SWEEP | 96 | 3 | int obj_id; | 97 | 3 | int pool_id; | 98 | 3 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 3 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 3 | #if MARK_SWEEP | 104 | 3 | header->obj_id = obj_id; | 105 | 3 | #ifndef NO_POOL_ALLOC | 106 | 3 | header->pool_id = pool_id; | 107 | 3 | #endif | 108 | 3 | #endif | 109 | 3 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 3 | memset(obj, 0, sizeof(T)); | 114 | 3 | return new (obj) T(std::forward<Args>(args)...); | 115 | 3 | } |
_Z5AllocI4ListIP6Tuple2IP6BigStriEEJEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
_Z5AllocI4ListIP6Tuple2IiP6BigStrEEJEEPT_DpOT0_ Line | Count | Source | 78 | 2 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 2 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 2 | "Expected no padding"); | 91 | | | 92 | 2 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 2 | #if MARK_SWEEP | 96 | 2 | int obj_id; | 97 | 2 | int pool_id; | 98 | 2 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 2 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 2 | #if MARK_SWEEP | 104 | 2 | header->obj_id = obj_id; | 105 | 2 | #ifndef NO_POOL_ALLOC | 106 | 2 | header->pool_id = pool_id; | 107 | 2 | #endif | 108 | 2 | #endif | 109 | 2 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 2 | memset(obj, 0, sizeof(T)); | 114 | 2 | return new (obj) T(std::forward<Args>(args)...); | 115 | 2 | } |
_Z5AllocIN7modules3DogEJRP6BigStrEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
_Z5AllocIN7module13CatEJEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
_Z5AllocIN7modules6SphinxEJRP6BigStrEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
_Z5AllocIN10hnode_asdl11hnode__LeafEJRP6BigStrNS0_7color_eEEEPT_DpOT0_ Line | Count | Source | 78 | 32 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 32 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 32 | "Expected no padding"); | 91 | | | 92 | 32 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 32 | #if MARK_SWEEP | 96 | 32 | int obj_id; | 97 | 32 | int pool_id; | 98 | 32 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 32 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 32 | #if MARK_SWEEP | 104 | 32 | header->obj_id = obj_id; | 105 | 32 | #ifndef NO_POOL_ALLOC | 106 | 32 | header->pool_id = pool_id; | 107 | 32 | #endif | 108 | 32 | #endif | 109 | 32 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 32 | memset(obj, 0, sizeof(T)); | 114 | 32 | return new (obj) T(std::forward<Args>(args)...); | 115 | 32 | } |
Unexecuted instantiation: _Z5AllocI4ListIPN10hnode_asdl7hnode_tEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10hnode_asdl12hnode__ArrayEJP4ListIPNS0_7hnode_tEEEEPT_DpOT0_ _Z5AllocIN10hnode_asdl11hnode__LeafEJP6BigStrNS0_7color_eEEEPT_DpOT0_ Line | Count | Source | 78 | 35 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 35 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 35 | "Expected no padding"); | 91 | | | 92 | 35 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 35 | #if MARK_SWEEP | 96 | 35 | int obj_id; | 97 | 35 | int pool_id; | 98 | 35 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 35 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 35 | #if MARK_SWEEP | 104 | 35 | header->obj_id = obj_id; | 105 | 35 | #ifndef NO_POOL_ALLOC | 106 | 35 | header->pool_id = pool_id; | 107 | 35 | #endif | 108 | 35 | #endif | 109 | 35 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 35 | memset(obj, 0, sizeof(T)); | 114 | 35 | return new (obj) T(std::forward<Args>(args)...); | 115 | 35 | } |
_Z5AllocI4DictIibEJEEPT_DpOT0_ Line | Count | Source | 78 | 38 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 38 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 38 | "Expected no padding"); | 91 | | | 92 | 38 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 38 | #if MARK_SWEEP | 96 | 38 | int obj_id; | 97 | 38 | int pool_id; | 98 | 38 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 38 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 38 | #if MARK_SWEEP | 104 | 38 | header->obj_id = obj_id; | 105 | 38 | #ifndef NO_POOL_ALLOC | 106 | 38 | header->pool_id = pool_id; | 107 | 38 | #endif | 108 | 38 | #endif | 109 | 38 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 38 | memset(obj, 0, sizeof(T)); | 114 | 38 | return new (obj) T(std::forward<Args>(args)...); | 115 | 38 | } |
Unexecuted instantiation: _Z5AllocIN10hnode_asdl18hnode__AlreadySeenEJRiEEPT_DpOT0_ _Z5AllocIN10hnode_asdl5FieldEJP6BigStrRPNS0_7hnode_tEEEPT_DpOT0_ Line | Count | Source | 78 | 105 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 105 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 105 | "Expected no padding"); | 91 | | | 92 | 105 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 105 | #if MARK_SWEEP | 96 | 105 | int obj_id; | 97 | 105 | int pool_id; | 98 | 105 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 105 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 105 | #if MARK_SWEEP | 104 | 105 | header->obj_id = obj_id; | 105 | 105 | #ifndef NO_POOL_ALLOC | 106 | 105 | header->pool_id = pool_id; | 107 | 105 | #endif | 108 | 105 | #endif | 109 | 105 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 105 | memset(obj, 0, sizeof(T)); | 114 | 105 | return new (obj) T(std::forward<Args>(args)...); | 115 | 105 | } |
Unexecuted instantiation: _Z5AllocIN10hnode_asdl5FieldEJP6BigStrRPNS0_12hnode__ArrayEEEPT_DpOT0_ _Z5AllocI4ListIPN10hnode_asdl5FieldEEJEEPT_DpOT0_ Line | Count | Source | 78 | 57 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 57 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 57 | "Expected no padding"); | 91 | | | 92 | 57 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 57 | #if MARK_SWEEP | 96 | 57 | int obj_id; | 97 | 57 | int pool_id; | 98 | 57 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 57 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 57 | #if MARK_SWEEP | 104 | 57 | header->obj_id = obj_id; | 105 | 57 | #ifndef NO_POOL_ALLOC | 106 | 57 | header->pool_id = pool_id; | 107 | 57 | #endif | 108 | 57 | #endif | 109 | 57 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 57 | memset(obj, 0, sizeof(T)); | 114 | 57 | return new (obj) T(std::forward<Args>(args)...); | 115 | 57 | } |
Unexecuted instantiation: _Z5AllocIN10hnode_asdl13hnode__RecordEJRP6BigStrS3_S3_P4ListIPNS0_5FieldEERPS5_IPNS0_7hnode_tEEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10hnode_asdl5FieldEJP6BigStrRPNS0_13hnode__RecordEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10hnode_asdl18hnode__AlreadySeenEJiEEPT_DpOT0_ _Z5AllocIN10hnode_asdl13hnode__RecordEJRP6BigStrS4_S4_P4ListIPNS0_5FieldEEDnEEPT_DpOT0_ Line | Count | Source | 78 | 57 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 57 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 57 | "Expected no padding"); | 91 | | | 92 | 57 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 57 | #if MARK_SWEEP | 96 | 57 | int obj_id; | 97 | 57 | int pool_id; | 98 | 57 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 57 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 57 | #if MARK_SWEEP | 104 | 57 | header->obj_id = obj_id; | 105 | 57 | #ifndef NO_POOL_ALLOC | 106 | 57 | header->pool_id = pool_id; | 107 | 57 | #endif | 108 | 57 | #endif | 109 | 57 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 57 | memset(obj, 0, sizeof(T)); | 114 | 57 | return new (obj) T(std::forward<Args>(args)...); | 115 | 57 | } |
Unexecuted instantiation: _Z5AllocIN10hnode_asdl5FieldEJRP6BigStrDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl12CompoundWordEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN12runtime_asdl15cmd_value__ArgvEJP4ListIP6BigStrEPS2_IPN11syntax_asdl12CompoundWordEEbDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4ListIPN12runtime_asdl9AssignArgEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN12runtime_asdl17cmd_value__AssignEJiP4ListIP6BigStrEPS2_IPN11syntax_asdl12CompoundWordEEPS2_IPNS0_9AssignArgEEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN12runtime_asdl17part_value__ArrayEJP4ListIP6BigStrEbEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4ListIPN12runtime_asdl12part_value_tEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN12runtime_asdl19part_value__ExtGlobEJP4ListIPNS0_12part_value_tEEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN12runtime_asdl12a_index__StrEJRP6BigStrEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN12runtime_asdl12a_index__IntEJiEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN12runtime_asdl18redirect_arg__PathEJRP6BigStrEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN12runtime_asdl20redirect_arg__CopyFdEJiEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN12runtime_asdl20redirect_arg__MoveFdEJiEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN12runtime_asdl21redirect_arg__HereDocEJRP6BigStrEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN12runtime_asdl17wait_status__ProcEJNS0_11job_state_eEiEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN12runtime_asdl21wait_status__PipelineEJNS0_11job_state_eEP4ListIiEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN12runtime_asdl22wait_status__CancelledEJiEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN12runtime_asdl15trace__ExternalEJP4ListIP6BigStrEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN12runtime_asdl9AssignArgEJRP6BigStrDnbDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN12runtime_asdl8ProcArgsEJDnDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN12runtime_asdl5PieceEJRP6BigStrbbEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN12runtime_asdl11VarSubStateEJbDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN12runtime_asdl4CellEJbbbDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN12runtime_asdl10VTestPlaceEJDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN12runtime_asdl10RedirValueEJiDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN12runtime_asdl11StatusArrayEJDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN12runtime_asdl13CommandStatusEJbbbDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN12runtime_asdl7HayNodeEJDnEEPT_DpOT0_ _Z5AllocIN11pretty_asdl10doc__BreakEJRP6BigStrEEPT_DpOT0_ Line | Count | Source | 78 | 162 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 162 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 162 | "Expected no padding"); | 91 | | | 92 | 162 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 162 | #if MARK_SWEEP | 96 | 162 | int obj_id; | 97 | 162 | int pool_id; | 98 | 162 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 162 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 162 | #if MARK_SWEEP | 104 | 162 | header->obj_id = obj_id; | 105 | 162 | #ifndef NO_POOL_ALLOC | 106 | 162 | header->pool_id = pool_id; | 107 | 162 | #endif | 108 | 162 | #endif | 109 | 162 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 162 | memset(obj, 0, sizeof(T)); | 114 | 162 | return new (obj) T(std::forward<Args>(args)...); | 115 | 162 | } |
_Z5AllocIN11pretty_asdl9doc__TextEJRP6BigStrEEPT_DpOT0_ Line | Count | Source | 78 | 391 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 391 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 391 | "Expected no padding"); | 91 | | | 92 | 391 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 391 | #if MARK_SWEEP | 96 | 391 | int obj_id; | 97 | 391 | int pool_id; | 98 | 391 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 391 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 391 | #if MARK_SWEEP | 104 | 391 | header->obj_id = obj_id; | 105 | 391 | #ifndef NO_POOL_ALLOC | 106 | 391 | header->pool_id = pool_id; | 107 | 391 | #endif | 108 | 391 | #endif | 109 | 391 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 391 | memset(obj, 0, sizeof(T)); | 114 | 391 | return new (obj) T(std::forward<Args>(args)...); | 115 | 391 | } |
Unexecuted instantiation: _Z5AllocIN11pretty_asdl11doc__IndentEJiDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11pretty_asdl9doc__FlatEJDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11pretty_asdl11doc__IfFlatEJDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11pretty_asdl11MeasuredDocEJDnDnEEPT_DpOT0_ _Z5AllocIN11pretty_asdl7MeasureEJiiEEPT_DpOT0_ Line | Count | Source | 78 | 2.43k | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 2.43k | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 2.43k | "Expected no padding"); | 91 | | | 92 | 2.43k | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 2.43k | #if MARK_SWEEP | 96 | 2.43k | int obj_id; | 97 | 2.43k | int pool_id; | 98 | 2.43k | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 2.43k | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 2.43k | #if MARK_SWEEP | 104 | 2.43k | header->obj_id = obj_id; | 105 | 2.43k | #ifndef NO_POOL_ALLOC | 106 | 2.43k | header->pool_id = pool_id; | 107 | 2.43k | #endif | 108 | 2.43k | #endif | 109 | 2.43k | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 2.43k | memset(obj, 0, sizeof(T)); | 114 | 2.43k | return new (obj) T(std::forward<Args>(args)...); | 115 | 2.43k | } |
Unexecuted instantiation: _Z5AllocIN11pretty_asdl11DocFragmentEJDnibDnEEPT_DpOT0_ _Z5AllocIN11pretty_asdl13List_MeasuredEJEEPT_DpOT0_ Line | Count | Source | 78 | 276 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 276 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 276 | "Expected no padding"); | 91 | | | 92 | 276 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 276 | #if MARK_SWEEP | 96 | 276 | int obj_id; | 97 | 276 | int pool_id; | 98 | 276 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 276 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 276 | #if MARK_SWEEP | 104 | 276 | header->obj_id = obj_id; | 105 | 276 | #ifndef NO_POOL_ALLOC | 106 | 276 | header->pool_id = pool_id; | 107 | 276 | #endif | 108 | 276 | #endif | 109 | 276 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 276 | memset(obj, 0, sizeof(T)); | 114 | 276 | return new (obj) T(std::forward<Args>(args)...); | 115 | 276 | } |
Unexecuted instantiation: _Z5AllocIN11pretty_asdl13List_MeasuredEJRP4ListIPNS0_11MeasuredDocEEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl19y_lvalue__ContainerEJDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl18sh_lvalue__IndexedEJRP6BigStriDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl16sh_lvalue__KeyedEJRP6BigStrS4_DnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4ListIPN10value_asdl7value_tEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl5TokenEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl14eggex_ops__YesEJP4ListIPNS0_7value_tEEPS2_IPN11syntax_asdl5TokenEEPS2_IP6BigStrEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl14cmd_frag__ExprEJDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl12value__SliceEJDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl10value__StrEJRP6BigStrEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4ListIPN10value_asdl16InitializerValueEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl22value__InitializerListEJP4ListIPNS0_16InitializerValueEEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl26value__InternalStringArrayEJP4ListIP6BigStrEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl16value__BashArrayEJDniEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl16value__BashAssocEJDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl11value__BoolEJbEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl10value__IntEJiEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl12value__FloatEJdEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl11value__ListEJP4ListIPNS0_7value_tEEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl11value__DictEJDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl12value__RangeEJiiEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl12value__EggexEJDnRP6BigStrP4ListIPNS0_7value_tEEPS5_IPN11syntax_asdl5TokenEEDnPS5_IS3_EEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl12value__PlaceEJDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl12value__FrameEJDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl17value__DebugFrameEJDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl16value__BoundFuncEJDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl18value__BuiltinFuncEJDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl11value__FuncEJRP6BigStrDnP4ListIPNS0_7value_tEEDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl18value__BuiltinProcEJDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl11value__ProcEJRP6BigStrDnDnDnDnbDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl11value__ExprEJDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl18value__CommandFragEJDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl14value__CommandEJDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl6IntBoxEJiEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl16InitializerValueEJDnRP6BigStrbEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl12ProcDefaultsEJDnDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl8LeftNameEJRP6BigStrDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl10RegexMatchEJRP6BigStrP4ListIiEDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl10SourceLineEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl12LiteralBlockEJDnP4ListIPN11syntax_asdl10SourceLineEEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN10value_asdl3ObjEJDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl18parse_result__NodeEJDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl14source__UnusedEJRP6BigStrEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl13source__StdinEJRP6BigStrEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl16source__MainFileEJRP6BigStrEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl17source__OtherFileEJRP6BigStrDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl15source__DynamicEJRP6BigStrDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl14source__VarRefEJDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl16source__VariableEJRP6BigStrDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl13source__AliasEJRP6BigStrDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl16source__ReparsedEJRP6BigStrDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl17source__SyntheticEJRP6BigStrEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl13loc__WordPartEJDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl9loc__WordEJDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl10loc__ArithEJDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl12loc__CommandEJDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl17loc__TokenTooLongEJDniiiEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl21debug_frame__MainFileEJRP6BigStrEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl19debug_frame__SourceEJDnRP6BigStrEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl21debug_frame__ProcLikeEJDnDnRP6BigStrEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl26debug_frame__BeforeErrTrapEJDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl22bracket_op__WholeArrayEJiEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl22bracket_op__ArrayIndexEJDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl16suffix_op__UnaryEJDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl17suffix_op__StaticEJDnRP6BigStrEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl17suffix_op__PatSubEJDnDniDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl16suffix_op__SliceEJDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl26InitializerWord__ArrayWordEJDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl17InitializerWord_tEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl29word_part__InitializerLiteralEJDnP4ListIPNS0_17InitializerWord_tEEDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl25word_part__EscapedLiteralEJDnRP6BigStrEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl20word_part__ZshVarSubEJDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl19word_part__TildeSubEJDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl19word_part__ArithSubEJDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl22word_part__BracedTupleEJP4ListIPNS0_12CompoundWordEEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl22word_part__BracedRangeEJDniRP6BigStrS4_iEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl27word_part__BracedRangeDigitEJRP6BigStrDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl18word_part__ExtGlobEJDnP4ListIPNS0_12CompoundWordEEDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl25word_part__BashRegexGroupEJDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl17word_part__SpliceEJDnRP6BigStrEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl18word_part__ExprSubEJDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl11word_part_tEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl16word__BracedTreeEJP4ListIPNS0_11word_part_tEEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl12word__StringEJiRP6BigStrDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl12sh_lhs__NameEJDnRP6BigStrEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl19sh_lhs__IndexedNameEJDnRP6BigStrDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl21sh_lhs__UnparsedIndexEJDnRP6BigStrS4_EEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl23arith_expr__UnaryAssignEJiDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl24arith_expr__BinaryAssignEJiDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl17arith_expr__UnaryEJiDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl18arith_expr__BinaryEJDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl21arith_expr__TernaryOpEJDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl19bool_expr__WordTestEJDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl17bool_expr__BinaryEJiDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl16bool_expr__UnaryEJiDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl21bool_expr__LogicalNotEJDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl21bool_expr__LogicalAndEJDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl20bool_expr__LogicalOrEJDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl13redir_loc__FdEJiEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl18redir_loc__VarNameEJRP6BigStrEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl21redir_param__HereWordEJDnbEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl20redir_param__HereDocEJDnDnP4ListIPNS0_11word_part_tEEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl18condition__YshExprEJDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl14case_arg__WordEJDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl17case_arg__YshExprEJDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl6word_tEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl10pat__WordsEJP4ListIPNS0_6word_tEEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl6expr_tEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl13pat__YshExprsEJP4ListIPNS0_6expr_tEEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl15for_iter__WordsEJP4ListIPNS0_6word_tEEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl17for_iter__YshExprEJDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl16proc_sig__ClosedEJDnDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl5RedirEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl17command__RedirectEJDnP4ListIPNS0_5RedirEEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl7EnvPairEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl15command__SimpleEJDnP4ListIPNS0_7EnvPairEEPS2_IPNS0_6word_tEEDnDnbEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl22command__ExpandedAliasEJDnP4ListIPNS0_7EnvPairEEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl17command__SentenceEJDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl10AssignPairEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl21command__ShAssignmentEJDnP4ListIPNS0_10AssignPairEEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl20command__ControlFlowEJDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl9command_tEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl17command__PipelineEJDnP4ListIPNS0_9command_tEEPS2_IPNS0_5TokenEEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl14command__AndOrEJP4ListIPNS0_9command_tEEPS2_IPNS0_5TokenEEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl16command__DoGroupEJDnP4ListIPNS0_9command_tEEDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl17command__SubshellEJDnDnDnbEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl15command__DParenEJDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl17command__DBracketEJDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl16command__ForEachEJDnP4ListIP6BigStrEDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl16command__ForExprEJDnDnDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl19command__WhileUntilEJDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl5IfArmEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl11command__IfEJDnP4ListIPNS0_5IfArmEEDnPS2_IPNS0_9command_tEEDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl7CaseArmEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl13command__CaseEJDnDnDnP4ListIPNS0_7CaseArmEEDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl19command__ShFunctionEJDnDnRP6BigStrDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl18command__TimeBlockEJDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl20command__CommandListEJP4ListIPNS0_9command_tEEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl17command__BareDeclEJDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl15command__RetvalEJDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl18glob_part__LiteralEJiRP6BigStrEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl19glob_part__OperatorEJiEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl20glob_part__CharClassEJbP4ListIP6BigStrEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl20printf_part__PercentEJP4ListIPNS0_5TokenEEDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl19place_op__SubscriptEJDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl19place_op__AttributeEJDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl9expr__VarEJDnRP6BigStrEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl11expr__ConstEJDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl10place_op_tEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl11expr__PlaceEJDnRP6BigStrP4ListIPNS0_10place_op_tEEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl13expr__LiteralEJDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl8NameTypeEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl12expr__LambdaEJP4ListIPNS0_8NameTypeEEDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl11expr__UnaryEJDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl12expr__BinaryEJDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl13expr__CompareEJDnP4ListIPNS0_5TokenEEPS2_IPNS0_6expr_tEEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl14expr__FuncCallEJDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl11expr__IfExpEJDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl11expr__TupleEJDnP4ListIPNS0_6expr_tEENS0_14expr_context_eEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl10expr__ListEJDnP4ListIPNS0_6expr_tEENS0_14expr_context_eEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl10expr__DictEJDnP4ListIPNS0_6expr_tEES6_EEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl13ComprehensionEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl14expr__ListCompEJDnDnP4ListIPNS0_13ComprehensionEEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl14expr__DictCompEJDnDnDnP4ListIPNS0_13ComprehensionEEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl18expr__GeneratorExpEJDnP4ListIPNS0_13ComprehensionEEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl11expr__RangeEJDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl11expr__SliceEJDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl12expr__SpreadEJDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl26class_literal_term__SpliceEJDnRP6BigStrEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl16re_repeat__RangeEJDnRP6BigStrS4_DnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl13re__PrimitiveEJDniEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl20class_literal_term_tEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl20re__CharClassLiteralEJbP4ListIPNS0_20class_literal_term_tEEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl17char_class_term_tEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl13re__CharClassEJbP4ListIPNS0_17char_class_term_tEEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl10re__SpliceEJDnRP6BigStrEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl10re__RepeatEJDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl4re_tEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl7re__SeqEJP4ListIPNS0_4re_tEEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl7re__AltEJP4ListIPNS0_4re_tEEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl9re__GroupEJDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl11re__CaptureEJDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl16re__BacktrackingEJbDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl16re__LiteralCharsEJDnRP6BigStrEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl12BoolParamBoxEJbEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl11IntParamBoxEJiEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl10SourceLineEJiRP6BigStrDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl5TokenEJiiiDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl12CompoundWordEJP4ListIPNS0_11word_part_tEEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl12BracedVarSubEJDnDnRP6BigStrDnDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl12DoubleQuotedEJDnP4ListIPNS0_11word_part_tEEDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl12SingleQuotedEJDnRP6BigStrDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl12SimpleVarSubEJDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl10CommandSubEJDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl15YshArrayLiteralEJDnP4ListIPNS0_6word_tEEDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl8NamedArgEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl7ArgListEJDnP4ListIPNS0_6expr_tEEDnPS2_IPNS0_8NamedArgEEDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl9AssocPairEJDnDnbEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl5RedirEJDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl10AssignPairEJDnDnNS0_11assign_op_eEDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl7EnvPairEJDnRP6BigStrDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl7CaseArmEJDnDnDnP4ListIPNS0_9command_tEEDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl9EggexFlagEJbDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl9EggexFlagEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl5EggexEJDnDnP4ListIPNS0_9EggexFlagEEDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl5IfArmEJDnDnDnP4ListIPNS0_9command_tEEDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl10BraceGroupEJDnDnP4ListIPNS0_9command_tEEDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl5ParamEJDnRP6BigStrDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl9RestParamEJDnRP6BigStrEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl5ParamEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl10ParamGroupEJP4ListIPNS0_5ParamEEDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl4ProcEJDnDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl4FuncEJDnDnDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl16ParsedAssignmentEJDnDniDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl7VarDeclEJDnP4ListIPNS0_8NameTypeEEDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl7y_lhs_tEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl8MutationEJDnP4ListIPNS0_7y_lhs_tEEDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl11ExprCommandEJDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl8TypeExprEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl8TypeExprEJDnRP6BigStrP4ListIPS1_EEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl8NameTypeEJDnRP6BigStrDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl13ComprehensionEJP4ListIPNS0_8NameTypeEEDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl8NamedArgEJDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl9SubscriptEJDnDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl9AttributeEJDnDnDnRP6BigStrNS0_14expr_context_eEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl10PosixClassEJDnRP6BigStrEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl9PerlClassEJDnRP6BigStrEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl8CharCodeEJDnibEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl9CharRangeEJDnDnEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl15List_of_commandEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11syntax_asdl15List_of_commandEJRP4ListIPNS0_9command_tEEEEPT_DpOT0_ _Z5AllocIN9expr_asdl11expr__ConstEJiEEPT_DpOT0_ Line | Count | Source | 78 | 15 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 15 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 15 | "Expected no padding"); | 91 | | | 92 | 15 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 15 | #if MARK_SWEEP | 96 | 15 | int obj_id; | 97 | 15 | int pool_id; | 98 | 15 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 15 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 15 | #if MARK_SWEEP | 104 | 15 | header->obj_id = obj_id; | 105 | 15 | #ifndef NO_POOL_ALLOC | 106 | 15 | header->pool_id = pool_id; | 107 | 15 | #endif | 108 | 15 | #endif | 109 | 15 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 15 | memset(obj, 0, sizeof(T)); | 114 | 15 | return new (obj) T(std::forward<Args>(args)...); | 115 | 15 | } |
_Z5AllocIN9expr_asdl9expr__VarEJRP6BigStrEEPT_DpOT0_ Line | Count | Source | 78 | 10 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 10 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 10 | "Expected no padding"); | 91 | | | 92 | 10 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 10 | #if MARK_SWEEP | 96 | 10 | int obj_id; | 97 | 10 | int pool_id; | 98 | 10 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 10 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 10 | #if MARK_SWEEP | 104 | 10 | header->obj_id = obj_id; | 105 | 10 | #ifndef NO_POOL_ALLOC | 106 | 10 | header->pool_id = pool_id; | 107 | 10 | #endif | 108 | 10 | #endif | 109 | 10 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 10 | memset(obj, 0, sizeof(T)); | 114 | 10 | return new (obj) T(std::forward<Args>(args)...); | 115 | 10 | } |
_Z5AllocIN9expr_asdl12expr__BinaryEJRP6BigStrDnDnEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
Unexecuted instantiation: _Z5AllocIN9expr_asdl9Measure_vEJiiEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN9expr_asdl11MeasuredDocEJRP6BigStrDnEEPT_DpOT0_ _Z5AllocIN9expr_asdl12CompoundWordEJEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
_Z5AllocIN9expr_asdl12CompoundWordEJRP4ListIP6BigStrEEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
Unexecuted instantiation: _Z5AllocIN10hnode_asdl11hnode__LeafEJRP6BigStrRNS0_7color_eEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4DictIiiEJEEPT_DpOT0_ _Z5AllocIN8pp_hnode12HNodeEncoderEJEEPT_DpOT0_ Line | Count | Source | 78 | 19 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 19 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 19 | "Expected no padding"); | 91 | | | 92 | 19 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 19 | #if MARK_SWEEP | 96 | 19 | int obj_id; | 97 | 19 | int pool_id; | 98 | 19 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 19 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 19 | #if MARK_SWEEP | 104 | 19 | header->obj_id = obj_id; | 105 | 19 | #ifndef NO_POOL_ALLOC | 106 | 19 | header->pool_id = pool_id; | 107 | 19 | #endif | 108 | 19 | #endif | 109 | 19 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 19 | memset(obj, 0, sizeof(T)); | 114 | 19 | return new (obj) T(std::forward<Args>(args)...); | 115 | 19 | } |
_Z5AllocIN6pretty13PrettyPrinterEJRiEEPT_DpOT0_ Line | Count | Source | 78 | 19 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 19 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 19 | "Expected no padding"); | 91 | | | 92 | 19 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 19 | #if MARK_SWEEP | 96 | 19 | int obj_id; | 97 | 19 | int pool_id; | 98 | 19 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 19 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 19 | #if MARK_SWEEP | 104 | 19 | header->obj_id = obj_id; | 105 | 19 | #ifndef NO_POOL_ALLOC | 106 | 19 | header->pool_id = pool_id; | 107 | 19 | #endif | 108 | 19 | #endif | 109 | 19 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 19 | memset(obj, 0, sizeof(T)); | 114 | 19 | return new (obj) T(std::forward<Args>(args)...); | 115 | 19 | } |
_Z5AllocIN11pretty_asdl11MeasuredDocEJPNS0_9doc__TextEPNS0_7MeasureEEEPT_DpOT0_ Line | Count | Source | 78 | 267 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 267 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 267 | "Expected no padding"); | 91 | | | 92 | 267 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 267 | #if MARK_SWEEP | 96 | 267 | int obj_id; | 97 | 267 | int pool_id; | 98 | 267 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 267 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 267 | #if MARK_SWEEP | 104 | 267 | header->obj_id = obj_id; | 105 | 267 | #ifndef NO_POOL_ALLOC | 106 | 267 | header->pool_id = pool_id; | 107 | 267 | #endif | 108 | 267 | #endif | 109 | 267 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 267 | memset(obj, 0, sizeof(T)); | 114 | 267 | return new (obj) T(std::forward<Args>(args)...); | 115 | 267 | } |
_Z5AllocIN11pretty_asdl11MeasuredDocEJPNS0_9doc__TextERPNS0_7MeasureEEEPT_DpOT0_ Line | Count | Source | 78 | 124 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 124 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 124 | "Expected no padding"); | 91 | | | 92 | 124 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 124 | #if MARK_SWEEP | 96 | 124 | int obj_id; | 97 | 124 | int pool_id; | 98 | 124 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 124 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 124 | #if MARK_SWEEP | 104 | 124 | header->obj_id = obj_id; | 105 | 124 | #ifndef NO_POOL_ALLOC | 106 | 124 | header->pool_id = pool_id; | 107 | 124 | #endif | 108 | 124 | #endif | 109 | 124 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 124 | memset(obj, 0, sizeof(T)); | 114 | 124 | return new (obj) T(std::forward<Args>(args)...); | 115 | 124 | } |
_Z5AllocI4ListIPN11pretty_asdl11MeasuredDocEEJEEPT_DpOT0_ Line | Count | Source | 78 | 333 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 333 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 333 | "Expected no padding"); | 91 | | | 92 | 333 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 333 | #if MARK_SWEEP | 96 | 333 | int obj_id; | 97 | 333 | int pool_id; | 98 | 333 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 333 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 333 | #if MARK_SWEEP | 104 | 333 | header->obj_id = obj_id; | 105 | 333 | #ifndef NO_POOL_ALLOC | 106 | 333 | header->pool_id = pool_id; | 107 | 333 | #endif | 108 | 333 | #endif | 109 | 333 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 333 | memset(obj, 0, sizeof(T)); | 114 | 333 | return new (obj) T(std::forward<Args>(args)...); | 115 | 333 | } |
_Z5AllocIN11pretty_asdl7MeasureEJRiiEEPT_DpOT0_ Line | Count | Source | 78 | 76 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 76 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 76 | "Expected no padding"); | 91 | | | 92 | 76 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 76 | #if MARK_SWEEP | 96 | 76 | int obj_id; | 97 | 76 | int pool_id; | 98 | 76 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 76 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 76 | #if MARK_SWEEP | 104 | 76 | header->obj_id = obj_id; | 105 | 76 | #ifndef NO_POOL_ALLOC | 106 | 76 | header->pool_id = pool_id; | 107 | 76 | #endif | 108 | 76 | #endif | 109 | 76 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 76 | memset(obj, 0, sizeof(T)); | 114 | 76 | return new (obj) T(std::forward<Args>(args)...); | 115 | 76 | } |
_Z5AllocIN11pretty_asdl7MeasureEJiRiEEPT_DpOT0_ Line | Count | Source | 78 | 628 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 628 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 628 | "Expected no padding"); | 91 | | | 92 | 628 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 628 | #if MARK_SWEEP | 96 | 628 | int obj_id; | 97 | 628 | int pool_id; | 98 | 628 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 628 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 628 | #if MARK_SWEEP | 104 | 628 | header->obj_id = obj_id; | 105 | 628 | #ifndef NO_POOL_ALLOC | 106 | 628 | header->pool_id = pool_id; | 107 | 628 | #endif | 108 | 628 | #endif | 109 | 628 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 628 | memset(obj, 0, sizeof(T)); | 114 | 628 | return new (obj) T(std::forward<Args>(args)...); | 115 | 628 | } |
_Z5AllocIN11pretty_asdl11MeasuredDocEJPNS0_10doc__BreakEPNS0_7MeasureEEEPT_DpOT0_ Line | Count | Source | 78 | 162 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 162 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 162 | "Expected no padding"); | 91 | | | 92 | 162 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 162 | #if MARK_SWEEP | 96 | 162 | int obj_id; | 97 | 162 | int pool_id; | 98 | 162 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 162 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 162 | #if MARK_SWEEP | 104 | 162 | header->obj_id = obj_id; | 105 | 162 | #ifndef NO_POOL_ALLOC | 106 | 162 | header->pool_id = pool_id; | 107 | 162 | #endif | 108 | 162 | #endif | 109 | 162 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 162 | memset(obj, 0, sizeof(T)); | 114 | 162 | return new (obj) T(std::forward<Args>(args)...); | 115 | 162 | } |
_Z5AllocIN11pretty_asdl11doc__IndentEJRiRPNS0_11MeasuredDocEEEPT_DpOT0_ Line | Count | Source | 78 | 57 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 57 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 57 | "Expected no padding"); | 91 | | | 92 | 57 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 57 | #if MARK_SWEEP | 96 | 57 | int obj_id; | 97 | 57 | int pool_id; | 98 | 57 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 57 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 57 | #if MARK_SWEEP | 104 | 57 | header->obj_id = obj_id; | 105 | 57 | #ifndef NO_POOL_ALLOC | 106 | 57 | header->pool_id = pool_id; | 107 | 57 | #endif | 108 | 57 | #endif | 109 | 57 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 57 | memset(obj, 0, sizeof(T)); | 114 | 57 | return new (obj) T(std::forward<Args>(args)...); | 115 | 57 | } |
_Z5AllocIN11pretty_asdl11MeasuredDocEJPNS0_11doc__IndentERPNS0_7MeasureEEEPT_DpOT0_ Line | Count | Source | 78 | 57 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 57 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 57 | "Expected no padding"); | 91 | | | 92 | 57 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 57 | #if MARK_SWEEP | 96 | 57 | int obj_id; | 97 | 57 | int pool_id; | 98 | 57 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 57 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 57 | #if MARK_SWEEP | 104 | 57 | header->obj_id = obj_id; | 105 | 57 | #ifndef NO_POOL_ALLOC | 106 | 57 | header->pool_id = pool_id; | 107 | 57 | #endif | 108 | 57 | #endif | 109 | 57 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 57 | memset(obj, 0, sizeof(T)); | 114 | 57 | return new (obj) T(std::forward<Args>(args)...); | 115 | 57 | } |
_Z5AllocIN11pretty_asdl11MeasuredDocEJRPNS0_13List_MeasuredERPNS0_7MeasureEEEPT_DpOT0_ Line | Count | Source | 78 | 276 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 276 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 276 | "Expected no padding"); | 91 | | | 92 | 276 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 276 | #if MARK_SWEEP | 96 | 276 | int obj_id; | 97 | 276 | int pool_id; | 98 | 276 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 276 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 276 | #if MARK_SWEEP | 104 | 276 | header->obj_id = obj_id; | 105 | 276 | #ifndef NO_POOL_ALLOC | 106 | 276 | header->pool_id = pool_id; | 107 | 276 | #endif | 108 | 276 | #endif | 109 | 276 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 276 | memset(obj, 0, sizeof(T)); | 114 | 276 | return new (obj) T(std::forward<Args>(args)...); | 115 | 276 | } |
_Z5AllocIN11pretty_asdl11MeasuredDocEJRPS1_RPNS0_7MeasureEEEPT_DpOT0_ Line | Count | Source | 78 | 76 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 76 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 76 | "Expected no padding"); | 91 | | | 92 | 76 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 76 | #if MARK_SWEEP | 96 | 76 | int obj_id; | 97 | 76 | int pool_id; | 98 | 76 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 76 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 76 | #if MARK_SWEEP | 104 | 76 | header->obj_id = obj_id; | 105 | 76 | #ifndef NO_POOL_ALLOC | 106 | 76 | header->pool_id = pool_id; | 107 | 76 | #endif | 108 | 76 | #endif | 109 | 76 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 76 | memset(obj, 0, sizeof(T)); | 114 | 76 | return new (obj) T(std::forward<Args>(args)...); | 115 | 76 | } |
Unexecuted instantiation: _Z5AllocIN11pretty_asdl11doc__IfFlatEJRPNS0_11MeasuredDocES4_EEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11pretty_asdl7MeasureEJRiS2_EEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11pretty_asdl11MeasuredDocEJPNS0_11doc__IfFlatEPNS0_7MeasureEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11pretty_asdl9doc__FlatEJRPNS0_11MeasuredDocEEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocIN11pretty_asdl11MeasuredDocEJPNS0_9doc__FlatEPNS0_7MeasureEEEPT_DpOT0_ _Z5AllocIN11pretty_asdl11DocFragmentEJPNS0_11MeasuredDocEibPNS0_7MeasureEEEPT_DpOT0_ Line | Count | Source | 78 | 19 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 19 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 19 | "Expected no padding"); | 91 | | | 92 | 19 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 19 | #if MARK_SWEEP | 96 | 19 | int obj_id; | 97 | 19 | int pool_id; | 98 | 19 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 19 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 19 | #if MARK_SWEEP | 104 | 19 | header->obj_id = obj_id; | 105 | 19 | #ifndef NO_POOL_ALLOC | 106 | 19 | header->pool_id = pool_id; | 107 | 19 | #endif | 108 | 19 | #endif | 109 | 19 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 19 | memset(obj, 0, sizeof(T)); | 114 | 19 | return new (obj) T(std::forward<Args>(args)...); | 115 | 19 | } |
_Z5AllocI4ListIPN11pretty_asdl11DocFragmentEEJEEPT_DpOT0_ Line | Count | Source | 78 | 19 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 19 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 19 | "Expected no padding"); | 91 | | | 92 | 19 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 19 | #if MARK_SWEEP | 96 | 19 | int obj_id; | 97 | 19 | int pool_id; | 98 | 19 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 19 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 19 | #if MARK_SWEEP | 104 | 19 | header->obj_id = obj_id; | 105 | 19 | #ifndef NO_POOL_ALLOC | 106 | 19 | header->pool_id = pool_id; | 107 | 19 | #endif | 108 | 19 | #endif | 109 | 19 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 19 | memset(obj, 0, sizeof(T)); | 114 | 19 | return new (obj) T(std::forward<Args>(args)...); | 115 | 19 | } |
_Z5AllocIN11pretty_asdl11DocFragmentEJRPNS0_11MeasuredDocEiRbRPNS0_7MeasureEEEPT_DpOT0_ Line | Count | Source | 78 | 57 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 57 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 57 | "Expected no padding"); | 91 | | | 92 | 57 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 57 | #if MARK_SWEEP | 96 | 57 | int obj_id; | 97 | 57 | int pool_id; | 98 | 57 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 57 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 57 | #if MARK_SWEEP | 104 | 57 | header->obj_id = obj_id; | 105 | 57 | #ifndef NO_POOL_ALLOC | 106 | 57 | header->pool_id = pool_id; | 107 | 57 | #endif | 108 | 57 | #endif | 109 | 57 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 57 | memset(obj, 0, sizeof(T)); | 114 | 57 | return new (obj) T(std::forward<Args>(args)...); | 115 | 57 | } |
_Z5AllocIN11pretty_asdl11DocFragmentEJRPNS0_11MeasuredDocERiRbRPNS0_7MeasureEEEPT_DpOT0_ Line | Count | Source | 78 | 724 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 724 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 724 | "Expected no padding"); | 91 | | | 92 | 724 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 724 | #if MARK_SWEEP | 96 | 724 | int obj_id; | 97 | 724 | int pool_id; | 98 | 724 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 724 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 724 | #if MARK_SWEEP | 104 | 724 | header->obj_id = obj_id; | 105 | 724 | #ifndef NO_POOL_ALLOC | 106 | 724 | header->pool_id = pool_id; | 107 | 724 | #endif | 108 | 724 | #endif | 109 | 724 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 724 | memset(obj, 0, sizeof(T)); | 114 | 724 | return new (obj) T(std::forward<Args>(args)...); | 115 | 724 | } |
Unexecuted instantiation: _Z5AllocIN11pretty_asdl11DocFragmentEJRPNS0_11MeasuredDocERibRPNS0_7MeasureEEEPT_DpOT0_ _Z5AllocIN5parse10ParseErrorEJP6BigStrEEPT_DpOT0_ Line | Count | Source | 78 | 5 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 5 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 5 | "Expected no padding"); | 91 | | | 92 | 5 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 5 | #if MARK_SWEEP | 96 | 5 | int obj_id; | 97 | 5 | int pool_id; | 98 | 5 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 5 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 5 | #if MARK_SWEEP | 104 | 5 | header->obj_id = obj_id; | 105 | 5 | #ifndef NO_POOL_ALLOC | 106 | 5 | header->pool_id = pool_id; | 107 | 5 | #endif | 108 | 5 | #endif | 109 | 5 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 5 | memset(obj, 0, sizeof(T)); | 114 | 5 | return new (obj) T(std::forward<Args>(args)...); | 115 | 5 | } |
_Z5AllocIN9expr_asdl12expr__BinaryEJRP6BigStrRPNS0_6expr_tES7_EEPT_DpOT0_ Line | Count | Source | 78 | 14 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 14 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 14 | "Expected no padding"); | 91 | | | 92 | 14 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 14 | #if MARK_SWEEP | 96 | 14 | int obj_id; | 97 | 14 | int pool_id; | 98 | 14 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 14 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 14 | #if MARK_SWEEP | 104 | 14 | header->obj_id = obj_id; | 105 | 14 | #ifndef NO_POOL_ALLOC | 106 | 14 | header->pool_id = pool_id; | 107 | 14 | #endif | 108 | 14 | #endif | 109 | 14 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 14 | memset(obj, 0, sizeof(T)); | 114 | 14 | return new (obj) T(std::forward<Args>(args)...); | 115 | 14 | } |
_Z5AllocIN5parse5LexerEJRP6BigStrEEPT_DpOT0_ Line | Count | Source | 78 | 14 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 14 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 14 | "Expected no padding"); | 91 | | | 92 | 14 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 14 | #if MARK_SWEEP | 96 | 14 | int obj_id; | 97 | 14 | int pool_id; | 98 | 14 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 14 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 14 | #if MARK_SWEEP | 104 | 14 | header->obj_id = obj_id; | 105 | 14 | #ifndef NO_POOL_ALLOC | 106 | 14 | header->pool_id = pool_id; | 107 | 14 | #endif | 108 | 14 | #endif | 109 | 14 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 14 | memset(obj, 0, sizeof(T)); | 114 | 14 | return new (obj) T(std::forward<Args>(args)...); | 115 | 14 | } |
_Z5AllocIN5parse6ParserEJRPNS0_5LexerEEEPT_DpOT0_ Line | Count | Source | 78 | 13 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 13 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 13 | "Expected no padding"); | 91 | | | 92 | 13 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 13 | #if MARK_SWEEP | 96 | 13 | int obj_id; | 97 | 13 | int pool_id; | 98 | 13 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 13 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 13 | #if MARK_SWEEP | 104 | 13 | header->obj_id = obj_id; | 105 | 13 | #ifndef NO_POOL_ALLOC | 106 | 13 | header->pool_id = pool_id; | 107 | 13 | #endif | 108 | 13 | #endif | 109 | 13 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 13 | memset(obj, 0, sizeof(T)); | 114 | 13 | return new (obj) T(std::forward<Args>(args)...); | 115 | 13 | } |
_Z5AllocIN9expr_asdl9Measure_vEJRiiEEPT_DpOT0_ Line | Count | Source | 78 | 10 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 10 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 10 | "Expected no padding"); | 91 | | | 92 | 10 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 10 | #if MARK_SWEEP | 96 | 10 | int obj_id; | 97 | 10 | int pool_id; | 98 | 10 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 10 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 10 | #if MARK_SWEEP | 104 | 10 | header->obj_id = obj_id; | 105 | 10 | #ifndef NO_POOL_ALLOC | 106 | 10 | header->pool_id = pool_id; | 107 | 10 | #endif | 108 | 10 | #endif | 109 | 10 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 10 | memset(obj, 0, sizeof(T)); | 114 | 10 | return new (obj) T(std::forward<Args>(args)...); | 115 | 10 | } |
_Z5AllocIN9expr_asdl11MeasuredDocEJP6BigStrRPNS0_9Measure_vEEEPT_DpOT0_ Line | Count | Source | 78 | 10 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 10 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 10 | "Expected no padding"); | 91 | | | 92 | 10 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 10 | #if MARK_SWEEP | 96 | 10 | int obj_id; | 97 | 10 | int pool_id; | 98 | 10 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 10 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 10 | #if MARK_SWEEP | 104 | 10 | header->obj_id = obj_id; | 105 | 10 | #ifndef NO_POOL_ALLOC | 106 | 10 | header->pool_id = pool_id; | 107 | 10 | #endif | 108 | 10 | #endif | 109 | 10 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 10 | memset(obj, 0, sizeof(T)); | 114 | 10 | return new (obj) T(std::forward<Args>(args)...); | 115 | 10 | } |
_Z5AllocIN15scoped_resource7MyErrorEJEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
_Z5AllocIN15scoped_resource8DirStackEJEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
_Z5AllocI4ListIbEJEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
_Z5AllocIN9test_cast11ColorOutputEJRPN5mylib9BufWriterEEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
_Z5AllocIN9test_cast12value__EggexEJRP6BigStrEEPT_DpOT0_ Line | Count | Source | 78 | 3 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 3 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 3 | "Expected no padding"); | 91 | | | 92 | 3 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 3 | #if MARK_SWEEP | 96 | 3 | int obj_id; | 97 | 3 | int pool_id; | 98 | 3 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 3 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 3 | #if MARK_SWEEP | 104 | 3 | header->obj_id = obj_id; | 105 | 3 | #ifndef NO_POOL_ALLOC | 106 | 3 | header->pool_id = pool_id; | 107 | 3 | #endif | 108 | 3 | #endif | 109 | 3 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 3 | memset(obj, 0, sizeof(T)); | 114 | 3 | return new (obj) T(std::forward<Args>(args)...); | 115 | 3 | } |
_Z5AllocIN9test_cast10value__IntEJiEEPT_DpOT0_ Line | Count | Source | 78 | 2 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 2 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 2 | "Expected no padding"); | 91 | | | 92 | 2 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 2 | #if MARK_SWEEP | 96 | 2 | int obj_id; | 97 | 2 | int pool_id; | 98 | 2 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 2 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 2 | #if MARK_SWEEP | 104 | 2 | header->obj_id = obj_id; | 105 | 2 | #ifndef NO_POOL_ALLOC | 106 | 2 | header->pool_id = pool_id; | 107 | 2 | #endif | 108 | 2 | #endif | 109 | 2 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 2 | memset(obj, 0, sizeof(T)); | 114 | 2 | return new (obj) T(std::forward<Args>(args)...); | 115 | 2 | } |
_Z5AllocIN15test_classes_gc6OpaqueEJEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
_Z5AllocIN15test_classes_gc10OpaqueBaseEJEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
_Z5AllocIN15test_classes_gc13OpaqueDerivedEJEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
_Z5AllocIN15test_classes_gc8PointersEJEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
_Z5AllocIN15test_classes_gc12PointersBaseEJEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
_Z5AllocIN15test_classes_gc15PointersDerivedEJEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
_Z5AllocIN15test_classes_gc14BaseWithMethodEJEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
_Z5AllocIN15test_classes_gc17DerivedWithMethodEJEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
_Z5AllocIN15test_classes_gc8WithDictEJEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
_Z5AllocIN15test_classes_gc6PrintfEJEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
Unexecuted instantiation: _Z5AllocI4ListIPN15test_classes_gc10OpaqueBaseEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4ListIPN15test_classes_gc12PointersBaseEEJEEPT_DpOT0_ Unexecuted instantiation: _Z5AllocI4ListIPN15test_classes_gc14BaseWithMethodEEJEEPT_DpOT0_ _Z5AllocI4DictIP6BigStrS2_EJSt16initializer_listIS2_ES5_EEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
_Z5AllocIN17test_default_args3FooEJiEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
_Z5AllocIN17test_default_args3FooEJiiEEPT_DpOT0_ Line | Count | Source | 78 | 2 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 2 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 2 | "Expected no padding"); | 91 | | | 92 | 2 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 2 | #if MARK_SWEEP | 96 | 2 | int obj_id; | 97 | 2 | int pool_id; | 98 | 2 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 2 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 2 | #if MARK_SWEEP | 104 | 2 | header->obj_id = obj_id; | 105 | 2 | #ifndef NO_POOL_ALLOC | 106 | 2 | header->pool_id = pool_id; | 107 | 2 | #endif | 108 | 2 | #endif | 109 | 2 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 2 | memset(obj, 0, sizeof(T)); | 114 | 2 | return new (obj) T(std::forward<Args>(args)...); | 115 | 2 | } |
_Z5AllocIN12test_globals7MyClassEJiEEPT_DpOT0_ Line | Count | Source | 78 | 10 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 10 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 10 | "Expected no padding"); | 91 | | | 92 | 10 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 10 | #if MARK_SWEEP | 96 | 10 | int obj_id; | 97 | 10 | int pool_id; | 98 | 10 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 10 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 10 | #if MARK_SWEEP | 104 | 10 | header->obj_id = obj_id; | 105 | 10 | #ifndef NO_POOL_ALLOC | 106 | 10 | header->pool_id = pool_id; | 107 | 10 | #endif | 108 | 10 | #endif | 109 | 10 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 10 | memset(obj, 0, sizeof(T)); | 114 | 10 | return new (obj) T(std::forward<Args>(args)...); | 115 | 10 | } |
_Z5AllocI7OSErrorJiEEPT_DpOT0_ Line | Count | Source | 78 | 2 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 2 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 2 | "Expected no padding"); | 91 | | | 92 | 2 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 2 | #if MARK_SWEEP | 96 | 2 | int obj_id; | 97 | 2 | int pool_id; | 98 | 2 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 2 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 2 | #if MARK_SWEEP | 104 | 2 | header->obj_id = obj_id; | 105 | 2 | #ifndef NO_POOL_ALLOC | 106 | 2 | header->pool_id = pool_id; | 107 | 2 | #endif | 108 | 2 | #endif | 109 | 2 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 2 | memset(obj, 0, sizeof(T)); | 114 | 2 | return new (obj) T(std::forward<Args>(args)...); | 115 | 2 | } |
_Z5AllocI6Tuple2IiP6BigStrEJRiS2_EEPT_DpOT0_ Line | Count | Source | 78 | 11 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 11 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 11 | "Expected no padding"); | 91 | | | 92 | 11 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 11 | #if MARK_SWEEP | 96 | 11 | int obj_id; | 97 | 11 | int pool_id; | 98 | 11 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 11 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 11 | #if MARK_SWEEP | 104 | 11 | header->obj_id = obj_id; | 105 | 11 | #ifndef NO_POOL_ALLOC | 106 | 11 | header->pool_id = pool_id; | 107 | 11 | #endif | 108 | 11 | #endif | 109 | 11 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 11 | memset(obj, 0, sizeof(T)); | 114 | 11 | return new (obj) T(std::forward<Args>(args)...); | 115 | 11 | } |
_Z5AllocI13StopIterationJEEPT_DpOT0_ Line | Count | Source | 78 | 3 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 3 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 3 | "Expected no padding"); | 91 | | | 92 | 3 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 3 | #if MARK_SWEEP | 96 | 3 | int obj_id; | 97 | 3 | int pool_id; | 98 | 3 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 3 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 3 | #if MARK_SWEEP | 104 | 3 | header->obj_id = obj_id; | 105 | 3 | #ifndef NO_POOL_ALLOC | 106 | 3 | header->pool_id = pool_id; | 107 | 3 | #endif | 108 | 3 | #endif | 109 | 3 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 3 | memset(obj, 0, sizeof(T)); | 114 | 3 | return new (obj) T(std::forward<Args>(args)...); | 115 | 3 | } |
_Z5AllocIN14test_iterators3FooEJEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
_Z5AllocIN12test_strings3FooEJEEPT_DpOT0_ Line | Count | Source | 78 | 1 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 1 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 1 | "Expected no padding"); | 91 | | | 92 | 1 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 1 | #if MARK_SWEEP | 96 | 1 | int obj_id; | 97 | 1 | int pool_id; | 98 | 1 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 1 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 1 | #if MARK_SWEEP | 104 | 1 | header->obj_id = obj_id; | 105 | 1 | #ifndef NO_POOL_ALLOC | 106 | 1 | header->pool_id = pool_id; | 107 | 1 | #endif | 108 | 1 | #endif | 109 | 1 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 1 | memset(obj, 0, sizeof(T)); | 114 | 1 | return new (obj) T(std::forward<Args>(args)...); | 115 | 1 | } |
_Z5AllocI6Tuple2IiiEJiiEEPT_DpOT0_ Line | Count | Source | 78 | 2 | T* Alloc(Args&&... args) { | 79 | | // Alloc() allocates space for both a header and object and guarantees that | 80 | | // they're adjacent in memory (so that they're at known offsets from one | 81 | | // another). However, this means that the address that the object is | 82 | | // constructed at is offset from the address returned by the memory allocator | 83 | | // (by the size of the header), and therefore may not be sufficiently aligned. | 84 | | // Here we assert that the object will be sufficiently aligned by making the | 85 | | // equivalent assertion that zero padding would be required to align it. | 86 | | // Note: the required padding is given by the following (according to | 87 | | // https://en.wikipedia.org/wiki/Data_structure_alignment): | 88 | | // `padding = -offset & (align - 1)`. | 89 | 2 | static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0, | 90 | 2 | "Expected no padding"); | 91 | | | 92 | 2 | DCHECK(gHeap.is_initialized_); | 93 | | | 94 | 0 | constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T); | 95 | 2 | #if MARK_SWEEP | 96 | 2 | int obj_id; | 97 | 2 | int pool_id; | 98 | 2 | void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id); | 99 | | #else | 100 | | void* place = gHeap.Allocate(num_bytes); | 101 | | #endif | 102 | 2 | ObjHeader* header = new (place) ObjHeader(T::obj_header()); | 103 | 2 | #if MARK_SWEEP | 104 | 2 | header->obj_id = obj_id; | 105 | 2 | #ifndef NO_POOL_ALLOC | 106 | 2 | header->pool_id = pool_id; | 107 | 2 | #endif | 108 | 2 | #endif | 109 | 2 | void* obj = header->ObjectAddress(); | 110 | | // Now that mycpp generates code to initialize every field, we should | 111 | | // get rid of this. | 112 | | // TODO: fix uftrace failure, maybe by upgrading, or working around | 113 | 2 | memset(obj, 0, sizeof(T)); | 114 | 2 | return new (obj) T(std::forward<Args>(args)...); | 115 | 2 | } |
|