summaryrefslogtreecommitdiff
path: root/include/rtl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-07-31 19:14:14 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-08-01 00:30:17 +0200
commitdf6ba650469a6f2fda06ef1c2e107ccdd3570505 (patch)
tree622799a3ee83fcf192e0ff4c75a6f5d7f3f865f4 /include/rtl
parent74ea0faf1f5556a09f1cc5acb89ba54bfbd586b9 (diff)
Remove "officially dead now" rtl_cache slab allocator mechanism
...after <https://gerrit.libreoffice.org/#/c/58263/> "the custom SAL allocator is no longer used" got merged. According to my July 31, 2018 comment there: "However, [...] this change is effectively a final coffin nail for the 'rtl_cache' mechanism. It could be argued that the alleged benefits of that mechanism (if it were still working) might be real (at least on some platforms; which would need measurements), and that it should be made working again (by reverting the effects of both ce906b8096081dee15dc8cc96e570d5b0b587955 'skip tricky allocators on G_SLICE=always-malloc' and bc6a5d8e79e7d0e7d75ac107aa8e6aa275e434e9 'Disable custom allocator' on rtl_cache_alloc/free again). But it could just as well be argued that the 'rtl_cache' mechanism is effectively gone for long enough now (since end of November, 2017, with bc6a5d8e79e7d0e7d75ac107aa8e6aa275e434e9 'Disable custom allocator') without any (apparent) negative consequences, so that it can be removed for good with this change." Change-Id: I8c1e45d494fc22555a9e675ab27be9e6e404abde Reviewed-on: https://gerrit.libreoffice.org/58369 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include/rtl')
-rw-r--r--include/rtl/alloc.h18
1 files changed, 4 insertions, 14 deletions
diff --git a/include/rtl/alloc.h b/include/rtl/alloc.h
index a55df0aaaf4c..cc3cec6ef292 100644
--- a/include/rtl/alloc.h
+++ b/include/rtl/alloc.h
@@ -220,7 +220,7 @@ typedef struct rtl_cache_st rtl_cache_type;
#define RTL_CACHE_NAME_LENGTH 31
-#define RTL_CACHE_FLAG_BULKDESTROY 1
+#define RTL_CACHE_FLAG_BULKDESTROY 1 /* obsolete */
/**
* @param[in] pName descriptive name; for debugging purposes.
@@ -230,8 +230,8 @@ typedef struct rtl_cache_st rtl_cache_type;
* @param[in] destructor object destructor callback function.
* @param[in] reclaim reclaim callback function.
* @param[in] pUserArg opaque argument passed to callback functions.
- * @param[in] pSource opaque argument passed to callback functions.
- * @param[in] nFlags flags.
+ * @param[in] pSource unused argument (should be null).
+ * @param[in] nFlags flags (unused).
*
* @return pointer to rtl_cache_type, or NULL upon failure.
*
@@ -299,16 +299,6 @@ SAL_DLLPUBLIC void SAL_CALL rtl_cache_free (
* spawning per-document instances. This is done
* by calling rtl_alloc_preInit with rtlAllocPreInitStart.
*
- * However before forking we need to wind down
- * all threads, which is required by design.
- * This is done by calling rtl_alloc_preInit
- * with rtlAllocPreInitEnd.
- *
- * And of course the stopped threads need restarting
- * after forking to ensure correct cleanup of the
- * caches and other memory allocations. This is done
- * by calling rtl_alloc_preInit with rtlAllocPostInit.
- *
* @since LibreOffice 6.1
*/
typedef enum
@@ -317,7 +307,7 @@ typedef enum
rtlAllocPreInitStart,
// Finish phase I of pre-init (before forking).
rtlAllocPreInitEnd,
- // Post pre-init and after forking.
+ // Post pre-init and after forking; no longer used.
rtlAllocPostInit
} rtl_alloc_preInit_phase_t;