aboutsummaryrefslogtreecommitdiffstats
path: root/common/almalloc.h
Commit message (Collapse)AuthorAgeFilesLines
* Check the container type given to DEF_NEWDEL and DEF_FAM_NEWDELChris Robinson2022-05-161-3/+7
| | | | | | | There's apparently no way to get the containing class/struct type from a static member function, and operator new/delete are implicitly static member functions so the macros to define them need to be told the type to allocate for. This ensures the type specified matches the containing type.
* Move assume_aligned to opthelpers.h and define force_inlineChris Robinson2022-03-301-36/+0
|
* Avoid a variable to subscript an array in offsetofChris Robinson2022-03-261-2/+8
|
* Try to improve assume_aligned for other compilersChris Robinson2022-03-251-2/+35
|
* Simplify a couple offsetof statementsChris Robinson2022-03-241-10/+4
|
* Remove an unnecessary noexceptChris Robinson2021-10-231-7/+4
|
* Add more noexceptChris Robinson2021-10-141-8/+8
|
* Properly noexcept the destroy methodsChris Robinson2021-10-141-5/+6
|
* Make a construct_at method amd use itChris Robinson2021-10-081-1/+6
|
* Add the gnu::malloc attribute to al_malloc and al_callocChris Robinson2021-10-071-2/+4
| | | | | | This helps the compiler know the returned pointer won't alias another pointer or existing object, since it's a fresh allocation, and is unlikely to return nullptr.
* Remove some unnecessary function attributesChris Robinson2021-01-231-4/+4
| | | | | | | | The alloc_size was wrong anyway since the function parameter takes the number of objects to be allocated and the attribute declares which is the number of bytes. The assume_aligned is unnecessary since the function is inlined and al_malloc/al_calloc already have appropriate attributes for the compiler to see.
* Make FlexArray trivially destructible when possibleChris Robinson2020-12-271-42/+89
|
* Ensure enough space is allocated for structs with a FlexArrayChris Robinson2020-08-151-1/+4
|
* Avoid a zero-length array for the FlexArray definitionChris Robinson2020-08-151-5/+4
| | | | | | Newer GCCs are warning about FlexArray being used at the end of another struct. Though not the most ideal to always allocate space for at least 1 element, actual 0-sized uses are rare and for smaller element types.
* Use an enum for FamCountChris Robinson2020-05-191-3/+3
|
* Apply some alloc and alignment attributesChris Robinson2020-04-101-16/+4
|
* Make a default/empty constructor noexceptChris Robinson2020-04-091-1/+1
|
* Remove some unused functionsChris Robinson2020-03-231-64/+3
|
* Add a macro to disable class-specific new/deleteChris Robinson2020-03-231-0/+6
|
* Properly define the new[] and delete[] operatorsChris Robinson2020-03-221-3/+10
|
* Avoid some pre-C++14 workaroundsChris Robinson2020-03-221-8/+0
|
* Fix some 'ambiguous' calls for newer MSVCChris Robinson2020-01-061-6/+6
|
* Ensure a pointer is provided for a templated iterator typeChris Robinson2020-01-051-2/+2
|
* Put the pragma defines in a separate headerChris Robinson2019-10-071-19/+4
|
* Add some allocator fields GCC 6.3 seems to wantChris Robinson2019-10-011-0/+6
|
* Work around MSVC's lack of standard _Pragma supportChris Robinson2019-09-181-7/+7
|
* Silence a couple specific warning instancesChris Robinson2019-09-181-0/+27
|
* Don't use [[nodiscard]] in C++11Chris Robinson2019-09-121-5/+5
| | | | To silence some warnings in older compilers, and fix an error with newer MSVC.
* Fix allocator comparison operatorsChris Robinson2019-09-111-4/+4
|
* Simplify flexible array member usageChris Robinson2019-09-111-2/+18
|
* Don't inherit for the allocatorChris Robinson2019-09-111-22/+18
|
* Add a Create method to FlexArray for "raw" arraysChris Robinson2019-08-031-0/+5
|
* Cleanup common sources' includesChris Robinson2019-07-291-4/+7
|
* Add C++17-like uninitialized_move methodsChris Robinson2019-07-011-0/+43
|
* Add an empty() method to FlexArrayChris Robinson2019-06-291-2/+2
|
* Fix ambiguous calls to destroy_atgeneotech2019-06-211-2/+2
|
* Use a FlexArray for the context's voicesChris Robinson2019-06-091-1/+1
|
* Add and use proper types for FlexArrayChris Robinson2019-06-071-20/+43
|
* Remove a couple unused functionsChris Robinson2019-06-061-8/+0
|
* Remove the DEF_ALIGN macroChris Robinson2019-06-061-2/+0
|
* Add methods to construct and destruct objects in-placeChris Robinson2019-06-051-5/+73
|
* Improve alignment handling for the alignment allocatorChris Robinson2019-06-031-2/+2
|
* Add front and back methods to FlexArrayChris Robinson2019-01-171-0/+6
|
* Add placement operator deleteChris Robinson2019-01-111-3/+7
|
* Add a missing includeChris Robinson2019-01-111-0/+1
|
* Add a flexible array template containerChris Robinson2019-01-111-0/+42
|
* Add and use a make_unique functionChris Robinson2019-01-011-0/+7
|
* Use static_cast instead of reinterpret_cast where possibleChris Robinson2018-12-281-1/+1
|
* Add an assume_aligned helperChris Robinson2018-12-201-0/+15
|
* Add and use a macro to define placement-new-only allocatorsChris Robinson2018-11-221-0/+4
| | | | | | This is for structs that utilize over-allocation, either flexible array members, or which store optional additional objects in the same allocation block.