[master] RFR: 8303816: [Lilliput] Use realloc instead of malloc+copy when growing the lock-stack
Roman Kennke
rkennke at openjdk.org
Wed Mar 8 11:32:33 UTC 2023
The message from this sender included one or more files
which could not be scanned for virus detection; do not
open these files unless you are certain of the sender's intent.
----------------------------------------------------------------------
We currently grow the fast-locking lock-stack by allocating a larger stack and copying over all elements. This can be done simpler and more efficient by using realloc instead of malloc+copy.
I also applied the same change to the upstream fast-locking PR: https://github.com/openjdk/jdk/pull/10907
Testing:
- [x] tier1
-------------
Commit messages:
- 8303816: [Lilliput] Use realloc instead of malloc+copy when growing the lock-stack
Changes: https://git.openjdk.org/lilliput/pull/79/files
Webrev: https://webrevs.openjdk.org/?repo=lilliput&pr=79&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8303816
Stats: 6 lines in 1 file changed: 0 ins; 5 del; 1 mod
Patch: https://git.openjdk.org/lilliput/pull/79.diff
Fetch: git fetch https://git.openjdk.org/lilliput pull/79/head:pull/79
PR: https://git.openjdk.org/lilliput/pull/79
More information about the lilliput-dev
mailing list