Леонид Юрьев (Leonid Yuriev)
c2cab7a6a8
mdbx: using clang-format-13
(cosmetics).
2021-12-02 20:22:31 +03:00
Leonid Yuriev
99b75b5004
mdbx: fix/model minor Coverity issues.
2021-08-16 23:45:56 +03:00
Leonid Yuriev
7759e52850
mdbx-windows: use MachineGuid
of any size for bootid
generation.
2021-07-19 12:07:45 +03:00
Leonid Yuriev
0b120b8fa9
mdbx-windows: fix bootid
generation for case of change system' time.
2021-07-19 12:05:55 +03:00
Leonid Yuriev
6034985686
mdbx: add MDBX_ASAN_(UN)POISON_MEMORY_REGION()
macros.
2021-07-16 16:03:49 +03:00
Leonid Yuriev
728e7f92b2
mdbx: minor fix mdbx_mresize()
to preserve result code for read-only cases.
2021-07-11 02:25:39 +03:00
Leonid Yuriev
1740043678
mdbx: minimize the size of poisoned/unpoisoned regions to avoid ASAN hangs.
...
More for second case of https://github.com/erthink/libmdbx/issues/217
2021-07-11 02:25:26 +03:00
Leonid Yuriev
891d68838a
mdbx: return MDBX_TOO_LARGE
under Valgrind/ASAN if being opened DB is 100 larger than RAM.
...
More for second case of https://github.com/erthink/libmdbx/issues/217
2021-07-11 02:25:07 +03:00
Leonid Yuriev
c30c3def8b
mdbx: the filesize
field of mdbx_mmap_t
now is not specific for Windows.
2021-07-10 16:10:30 +03:00
Leonid Yuriev
cf5f31c577
mdbx: make __cold
attribute first (cosmetic).
2021-07-03 01:51:04 +03:00
Leonid Yuriev
d7c06b1337
mdbx: partial fix for recursive SRW-lock with MDBX_NOTLS
on Windows.
...
Here are some changes to avoid recursive acquisition of SRW-lock,
which is still in use:
- Read transactions don't acquire the shared SRW-lock with `MDBX_NOTLS.
- Memory-mapping of DB is always kept while DB opened,
therefore following limitations are:
- DB file can't be shrinked while it used,
including auto-shrink due to auto-compactification with corresponding geometry settings.
- The upper limit of DB size can't be changed while DB is used.
- The DB can grow within the upper size limit defined while opening by a first process,
but this does not work under Wine since there is no `NtExtendSection()` function.
Partially fix https://github.com/erthink/libmdbx/issues/203
2021-06-10 13:42:30 +03:00
Leonid Yuriev
a7167ce715
mdbx: allow open DB on 9P/WSL2 filesystem in exclusive mode.
...
Related to https://github.com/erthink/libmdbx/issues/97
2021-05-26 21:08:37 +03:00
Leonid Yuriev
b0830db25a
mdbx: add 9P
(WSL2 DrvFs) to blacklist of remote filesystems.
...
Related to https://github.com/erthink/libmdbx/issues/97
2021-05-26 20:33:08 +03:00
Leonid Yuriev
9c7c709b3e
mdbx: avoid underflow during monotime/16dot16 conversion.
2021-05-12 17:44:18 +03:00
Leonid Yuriev
ebab75642e
mdbx: add public MDBX_MAYBE_UNUSED
.
...
This also should fix C++ mdbx API build by MSVC 2015.
2021-05-11 21:07:40 +03:00
Leonid Yuriev
5ae120af80
mdbx-windows: more crutches for MinGW.
...
More for https://github.com/erthink/libmdbx/issues/155
Change-Id: I7de6122ff160372b2dcfd2a0a26e332cb52d0560
2021-05-08 18:38:44 +03:00
Leonid Yuriev
ab1fc94a5b
mdbx-windows: fix build for Windows XP/2000 (_WIN32_WINNT
< 0x0600).
...
Related to https://github.com/erthink/libmdbx/issues/155
Change-Id: Ibd795817e05b6da39ef270ce7b55b31d963d07b0
2021-05-08 18:38:26 +03:00
Leonid Yuriev
55f41f40a1
mdbx: rename log2n_powerof2()
.
...
Change-Id: I22290630186c5041b6ae242d0db1f5c5f36da4ec
2021-04-26 02:06:28 +03:00
Leonid Yuriev
024ccf6826
mdbx: extract mdbx_get_sysraminfo()
.
...
Change-Id: I8821009572d275a3b5d2d8729f605b115a80e50a
2021-04-07 04:45:53 +03:00
Leonid Yuriev
6c9e8817b7
mdbx-posix: use MAP_NORESERVE
.
...
Change-Id: I6a46a5bfa5ed3fa5c3f26775fcba346f71106ad1
2021-03-17 01:27:23 +03:00
Leonid Yuriev
0be7616521
mdbx-posix: minor around MAP_FIXED_NOREPLACE
.
...
Change-Id: I0991a5ed1e1706442675d9514932fad30de372f8
2021-03-17 01:27:23 +03:00
Leonid Yuriev
b164baa1f5
mdbx: add MDBX_ENABLE_MADVISE
build option/macro.
...
Change-Id: I6174ec62e4811e891663b8ae0f7918aa09baf5ab
2021-03-17 01:18:18 +03:00
Leonid Yuriev
251eda6fb8
mdbx: HNY!
...
Change-Id: I86c7028001b349e3d06b837dc8e2f7e60fb3b1a2
2021-01-26 07:27:13 +03:00
Leonid Yuriev
a4df0acb00
mdbx: more logging for FD < STDERR_FILENO
.
...
More for https://github.com/erthink/libmdbx/issues/144
Change-Id: I8dcd3cab8a39b16a1836c88ec92b30d6b0de8b51
2020-12-06 14:35:38 +03:00
Leonid Yuriev
d116e7235a
mdbx-posix: safeguard for DB corruption in case FD <= STDERR_FILENO
.
...
Resolve https://github.com/erthink/libmdbx/issues/144
Change-Id: Ic3467338d494b021fa0d1863c8227976d0a2bcd5
2020-12-05 22:51:45 +03:00
Leonid Yuriev
2dab009e76
mdbx-windows: handling EXCEPTION_POSSIBLE_DEADLOCK
.
...
Change-Id: If42c7833e9c4e02fef25634e69c0bd2e926686c1
2020-11-29 05:49:15 +03:00
Leonid Yuriev
2a740d3807
mdbx-windows: fix ERROR_NOT_SUPPORTED
while opening UNC pathnames.
...
Resolve https://github.com/miranda-ng/miranda-ng/issues/2627
Change-Id: Iec06554dfcb9e0db215662d93fb5824cfe9ac7ef
2020-11-24 15:53:14 +03:00
Leonid Yuriev
23fd4444b5
mdbx-windows: remap whole section for mmap-resize if NtExtendSection()
not available (Wine).
...
Some workaround for https://github.com/miranda-ng/miranda-ng/issues/1209
Change-Id: I8ce3cb0fb8bdc9bd36a05ab53343efbe4080d1f3
2020-11-23 10:47:07 +03:00
Leonid Yuriev
f76bf72021
mdbx-windows: retry resize-mmap always with reservation (less chance to failure).
...
Change-Id: I472651f6906b88ba674868e0cd6c81318bfc255b
2020-11-20 11:52:44 +03:00
Leonid Yuriev
0627d902dd
mdbx: add mdbx_env_delete()
.
...
Resolves https://github.com/erthink/libmdbx/issues/119
Related to https://github.com/Kerollmops/heed/issues/58
Change-Id: Iec5bf5978e45bb6843f3ed8dd06ea4d34f2895cb
2020-10-10 00:58:53 +03:00
Leonid Yuriev
9b64b95bbc
mdbx-windows: fix mdbx_RegGetValue() for Windows 2000/XP.
...
Change-Id: I436a254300fcba8dbf75ea7568c2bf0c963fe060
2020-10-08 01:50:18 +03:00
Leonid Yuriev
280ed17ea2
mdbx: fix obsolete __noreturn
.
...
Change-Id: Ic78843d6f16de2a409c16ceecc7acb2ed8aa3e68
2020-10-05 19:14:20 +03:00
Leonid Yuriev
1e3f633665
mdbx: fix build with uclibc.
...
Change-Id: I907fecd84b335a84d5f1dcaa44ac489c4dfb1907
2020-09-27 17:01:59 +03:00
Leonid Yuriev
860aa017db
mdbx: Merge branch 'master' into devel.
...
Change-Id: Ic130cd181097332aa2f49019d75403e18d8cba0d
2020-09-25 01:14:57 +03:00
Josh Soref
448728f584
mdbx: a lot of spelling (squashed).
...
Many Thanks to Josh Soref for these fixes.
https://github.com/jsoref
Resolves https://github.com/erthink/libmdbx/pull/118 .
Change-Id: I4e09347da5c9d7a77cdd918a3b15284371440076
2020-09-25 01:01:25 +03:00
Leonid Yuriev
24c0749eb8
mdbx: rework/refine mdbx_mresize() for POSIX and MAP_FIXED_NOREPLACE (Linux 4.17).
...
Change-Id: I2e531b5e3e009b2a18ae1901fc7e2e6e4df667cd
2020-09-22 04:07:43 +03:00
Leonid Yuriev
cacc4aa829
mdbx++: changes after codereview-1 (part 2 of 2).
...
Change-Id: I8e1ca134bb8c5d447895f116247dfd12fa6871f0
2020-09-14 21:19:56 +03:00
Leonid Yuriev
cd4caeb03d
mdbx: add mdbx_panic() to C API.
...
Change-Id: I009a7889311b57ae2210822a8087889f900919f8
2020-09-10 15:37:59 +03:00
Leonid Yuriev
88a4b8cb9b
mdbx++: Initial C++ API (some extra methods are not implemented).
...
Change-Id: I0478d0c94dcd12b52916e87815e5731817407c3c
2020-08-28 16:45:30 +03:00
Leonid Yuriev
5e43ee61a2
mdbx: drop/deprecate MDBX_MAPASYNC.
...
Change-Id: I472f97f568a32325eb056c8ee4d2f2350a473bda
2020-08-06 01:48:56 +03:00
Leonid Yuriev
2cd7fcb16d
mdbx: fix minor Coverity issues.
...
Change-Id: I21c44de18e4e620ecec38ec837446150736faf79
2020-07-24 17:43:35 +03:00
Leonid Yuriev
3351c1f869
mdbx: implements remapping of the database file when it it possible.
...
Change-Id: Ida15ba1f396a33b2c6063e680dff612f39a9608f
2020-07-06 16:23:52 +03:00
Leonid Yuriev
51a016245a
mdbx: using couple of condvars/events to avoid glitches on Windows.
...
Change-Id: I3256a8dcbb95c78e8dea3eb31ca73f42c58d2f61
2020-05-24 13:29:55 +03:00
Leonid Yuriev
971f924c44
mdbx-build: rearrange source files, rework CMakeLists.txt and refine GNUMakefile (squashed).
...
Change-Id: Id73d346695011dab2f670bb9e6293a1e5a1835ca
2020-04-17 00:37:57 +03:00
Leonid Yuriev
f81374a9ce
mdbx-build: amalgamation.
...
Change-Id: Ic32de6ee119df2bc12136b882f4f7cabaa1314a9
2019-09-03 02:30:55 +03:00
Leonid Yuriev
327e5feb97
mdbx-windows: one more fix build for Windows/SDK pair.
...
Change-Id: Ifa480703b153625d0fa96a15d70bd0c452352cb6
2019-08-29 23:48:51 +03:00
Leonid Yuriev
137d652d77
mdbx: refine attribute-based macros.
2019-08-25 04:37:15 +03:00
Leonid Yuriev
7780b76cf0
mdbx: fix internal typo.
...
Change-Id: Ib31e8f02d816758a66b5e6b260714e25648f66c2
2019-08-25 04:36:30 +03:00
Leonid Yuriev
93f82f47bd
mdbx: refine setup_debug(), add MDBX_DBG_LEGACY_MULTIOPEN.
...
Change-Id: I5d144f6fa27b8f5885fa0a0fbd11fe1d44bcc41c
2019-08-25 04:36:28 +03:00
Leonid Yuriev
4ceaf842fe
mdbx: add timed auto-sync feature.
...
Change-Id: Ia9b8529fda321d5f78b306f270d157a78f708916
2019-08-23 13:13:20 +03:00