summaryrefslogtreecommitdiff
path: root/sal/rtl/alloc_arena.cxx
AgeCommit message (Collapse)Author
2018-10-09Extend loplugin:redundantinline to catch inline functions w/o external linkageStephan Bergmann
...where "inline" (in its meaning of "this function can be defined in multiple translation units") thus doesn't make much sense. (As discussed in compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions in include files for now.) All the rewriting has been done automatically by the plugin, except for one instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus some subsequent solenv/clang-format/reformat-formatted-files. Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224 Reviewed-on: https://gerrit.libreoffice.org/61573 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-27Related: rhbz#1602589 add comments to coverity annotationsCaolán McNamara
Change-Id: I88c941832a0d682ea4b6028c28edd48cf5df38f7 Reviewed-on: https://gerrit.libreoffice.org/58093 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-06-11new loplugin:shouldreturnboolNoel Grandin
look for methods returning only 1 and/or 0, which (most of the time) should be returning bool. Off by default, because some of this is a matter of taste Change-Id: Ib17782e629888255196e89d4a178618a9612a0de Reviewed-on: https://gerrit.libreoffice.org/54379 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-17Remove leftover "#pragma GCC diagnostic ignored" halfStephan Bergmann
...where the other half introduced with 1b12d5ecb1be36267534e0b980d7c53d50645511 "Work around GCC 7 mis-feature" has now been removed with 6da400912e8c69ae86650e799767da54ee422392 "[API CHANGE] Remove no longer working rtl_arena -> rtl_cache feature" Change-Id: I79b71d119848150c0ebd2244f0ace08609fd17e9 Reviewed-on: https://gerrit.libreoffice.org/54417 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-05-16[API CHANGE] Remove no longer working rtl_arena -> rtl_cache featureStephan Bergmann
rtl_arena_create's quantum_cache_max parameter (when non-zero) would have allowed an rtl_arena to internally use an rtl_cache for chunk allocation. (And none of the LO-internal uses of rtl_arena_create makes use of that.) However, with the combination of old ce906b8096081dee15dc8cc96e570d5b0b587955 "skip tricky allocators on G_SLICE=always-malloc" and recent bc6a5d8e79e7d0e7d75ac107aa8e6aa275e434e9 "Disable custom allocator", rtl_cache unconditionally just uses malloc/free now, so the rtl_arena_create quantum_cache_max feature has effectively become irrelevant. As those changes appear to have no negative consequences overall (and help remove quite a chunk of no-longer used code), leave it at that and officially abandon the quantum_cache_max feature. Change-Id: I7d186a4a1589db6a73059c2be164aa81d81aef47 Reviewed-on: https://gerrit.libreoffice.org/54388 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-04-27loplugin:constantparamNoel Grandin
Change-Id: I966dcf87be021520e7cc394338b9c0574bb8afee Reviewed-on: https://gerrit.libreoffice.org/53541 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-20loplugin:constantparamNoel Grandin
Change-Id: Ia58d8950b3b9e48bbe9f075b9fe1eed62d9abf0d Reviewed-on: https://gerrit.libreoffice.org/53188 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-23More loplugin:cstylecast on WindowsStephan Bergmann
Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after cab0427cadddb3aaf1349c66f2fa13a4234ba4b2 "Enable loplugin:cstylecast for some more cases" and a409d32e7f6fc09e041079d6dbc3c927497adfed "More loplugin:cstylecast" Change-Id: Ib3355159dd08333e1b7a8d091caf2069cdcc7862 Reviewed-on: https://gerrit.libreoffice.org/48317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-19SAL_W32 is just an alias for _WIN32Stephan Bergmann
...so consistently use the latter instead of the former Change-Id: I144d5e7c472632f93b2258461510346bc85892d9 Reviewed-on: https://gerrit.libreoffice.org/48135 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-12More loplugin:cstylecast: salStephan Bergmann
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I7d89b011464ba5d2dd12e04d5fc9f65cb4daebde
2017-12-15sal: add pre-initialization scheme for allocations.Michael Meeks
This saves several megabytes of dirtied pages for each LOK client of Online. Change-Id: I425a2e7896879f0a64d71fcc0655e9e1fa1256aa
2017-12-11loplugin:salcall fix functionsNoel Grandin
since cdecl is the default calling convention on Windows for such functions, the annotation is redundant. Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d Reviewed-on: https://gerrit.libreoffice.org/46164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-29loplugin:unnecessaryparen (clang-cl)Stephan Bergmann
Change-Id: I3a2b7ed3fdef3b77c0a052b10f88918aa616779e Reviewed-on: https://gerrit.libreoffice.org/45469 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-20look for =() in loplugin:unnecessaryparenNoel Grandin
Change-Id: I4f9b71ff7767e90987bb40358fc46ed5d1d571d0 Reviewed-on: https://gerrit.libreoffice.org/44944 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23loplugin:includeform: salStephan Bergmann
Change-Id: I539ca8b9dee5edc5fc2282a2b9b0ffd78bad8b11
2017-07-23followup b714ba73c - remove excessive bracesChris Sherlock
Change-Id: I59fe131c6d14d9058fedaf89a2e9d5ceca444aa5
2017-07-22rtl: remove comparisons against nullptr from RTL mem filesChris Sherlock
Change-Id: Ic0ae0378d5b46b3d11c99aef2e845796ad0a9c71
2017-07-22rtl: remove comment cruft from alloc filesChris Sherlock
Change-Id: Ibac120af6879739091aacefef5c773649e222f85
2017-07-10teach unnecessaryparen loplugin about identifiersNoel Grandin
Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b Reviewed-on: https://gerrit.libreoffice.org/39737 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-05new loplugin unnecessaryparenNoel Grandin
Change-Id: Ic883a07b30069ca6342d7521c8ad890f4326f0ec Reviewed-on: https://gerrit.libreoffice.org/39549 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-09cleanup osl/diagnose.h includesJochen Nitschke
with command > git grep -l osl/diagnose.h *.cxx | xargs grep -L -w 'OSL_\w*' | xargs sed -i '/#include *\(<\|\"\)osl\/diagnose.h\(>\|\"\).*/d' headers need more work Change-Id: I906519ebbd47a04703b4fa5943b2f7abea7a97ab Reviewed-on: https://gerrit.libreoffice.org/37350 Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-05-03Work around GCC 7 mis-featureStephan Bergmann
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80354> "Poor support to silence -Wformat-truncation=1" Change-Id: I486f8a3a12896df3d9506f53bca44a318e23c991
2017-04-26loplugin:redundantcast (clang-cl)Stephan Bergmann
Change-Id: I5164bc1bfa1aaae0f648e0384227d92c8b2ff7a3
2017-01-22coverity#1399029 silence Out-of-bounds readCaolán McNamara
Change-Id: I025e416a6a162316d82cfbde9fbfcb0a45e888d5
2017-01-20tweak high/low bit so we're always shifting with an unsigned numberCaolán McNamara
Change-Id: Ic1c3f1f8aa6a16befb348652b0f5c3f82f47e0e7
2017-01-17replace #ifdef SOLARIS with #ifdef __sunMichael Stahl
Check for a macro that is defined by the compiler, we don't really need one defined by the build system. Change-Id: Iccb8e3198396881395c97a6b81690ebe64b7e9d2
2016-10-04clang-cl loplugin: salStephan Bergmann
Change-Id: If04d3f07dc8bffac8887773b5424c09848cd8f1a Reviewed-on: https://gerrit.libreoffice.org/29404 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-04-07Drop pointless "internal" directory level for already internal include filesTor Lillqvist
Change-Id: I496fdbab3e17c806c2d16513412c4c1b9120bc3c
2016-02-23new loplugin: commaoperatorNoel Grandin
Change-Id: I03f24e61f696b7619855e3c7010aa0d874e5a4ff
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I1bc6c87fcd6e5e96362623be94c59be216a3b2b8
2015-03-28Clean up C-style casts from pointers to voidStephan Bergmann
Change-Id: I5e370445affbcd32b05588111f74590bf24f39d6
2015-02-23remove unnecessary parenthesis in return statementsNoel Grandin
found with $ git grep -lP 'return\s*\(\s*\w+\s*\)\s*;' Change-Id: Ic51606877a9edcadeb647c5bf17bc928b69ab60e
2015-01-16rtl_arena_alloc must never obey AMode_SYSTEMStephan Bergmann
...as e.g. the read+write+exec arena used in bridges/source/cpp_uno/shared/vtablefactory.cxx has specific requirements on obtained memory. This broke recent 8b9968a26265facaf5e761485d750ce9cedab3ab "fdo#72755: Only use double mmap as fallback" for e.g. --enable-ooenv (which sets G_SLICE). This is a partial revert of ce906b8096081dee15dc8cc96e570d5b0b587955 "skip tricky allocators on G_SLICE=always-malloc." Change-Id: I5a5fb7c3c920a7856381e6c55638137c625b5111
2015-01-07loplugin:cstylecast: salStephan Bergmann
Change-Id: I0ad9681a8b31d78cefce5b66040415154a1c7a99
2014-11-05markup with event type not checker typeCaolán McNamara
Change-Id: I14c0c5d90b67000cb4fe9e6be647854abfe784da
2014-10-31cid#1202756 Clarify with assert that ave == 0 cannot happenStephan Bergmann
...so (highbit(ave) - 1) will never be negative and never cause undefined shift by negative value. Change-Id: I86703f03d30d48c74d2e814c182b9edb85d18186
2014-10-31cid#1202755 Clarify with assert that new_size == 0 cannot happenStephan Bergmann
...so arena->m_hash_shfit will never be negative and never cause undefined shift by negative value. Change-Id: Ifc3d28d53bae38bc8deea72473c81f1d043dc18e
2014-04-03Kill superfluous vertical whitespaceTor Lillqvist
Change-Id: I8c37b9ec45836f9c0e2dc0cf232f96f23c7c36d3
2014-01-10Use boolStephan Bergmann
Change-Id: I46c30a62fb39c2223a369f91010a860372efc72f
2013-08-30WaE: C4334: '<<' : result of 32-bit shift implicitly converted to 64 bitsTor Lillqvist
1UL is not a portable way to get a size_t -sized one. Change-Id: I8fac16b7e1f1b8bbccb4bd11eacc9449fc3f8c33
2013-06-10mingw64: casting to pointer from narrower integer fixes in salFridrich Štrba
Change-Id: I63321e33f92223be47c7ee25dbf03fe3032991d6
2013-03-27Hopefully _BSD_SOURCE not needed anywhere for MAP_ANONStephan Bergmann
(-Werror=unused-macros on Android) Change-Id: I393face32e7d4782b5c8037fa8ebeb21ec3c6e7a
2013-03-04Cleanup static and inline usage in alloc_impl.Arnaud Versini
Change-Id: I88170c9d033e0299c4b4462f7d0edb83152b4fbb Reviewed-on: https://gerrit.libreoffice.org/2367 Reviewed-by: Michael Meeks <michael.meeks@suse.com> Tested-by: Michael Meeks <michael.meeks@suse.com>
2013-02-22Bin pointless single-child directory levelTor Lillqvist
Change-Id: I03de46fb6c095bb176fd25fc5f803be6d2d89bcf