Commit Graph

912 Commits

Author SHA1 Message Date
matt peters
30c1d0cddc Containers/RingBuffer.h: Implement use of the AllocatorT template parameter to TRingBuffer instead of bypassing it and always allocating from FMemory.
#rnx
#rb Steve.Robb

[CL 36265305 by matt peters in 5.5 branch]
2024-09-13 10:32:14 -04:00
Ryan Hummer
4af2fd066d Updating Dev-Release-5.5 from Main at CL #36144969
#okforversepublic

[CL 36146571 by Ryan Hummer in Dev-5.5 branch]
2024-09-10 10:26:02 -04:00
russell johnston
c678b783c2 Property support for containers with intrusive unset optional states
#rb steve.robb

[CL 36011287 by russell johnston in ue5-main branch]
2024-09-04 11:43:38 -04:00
ben clayton
f64f4f7837 [AutoRTFM] Prevent memory corruption with stack writes in non-scoped transactions
Assert if you attempt to perform a write to the transaction-stack while in non-scoped transaction (writes to a Closed() scope are permitted).

Code changes:

Introduce FStackRange to hold a stack pointer range.

Use FStackRange in FContext for storing the true stack range for the thread.

Add a FStackRange to each FTransaction, and use this to ensure that write records aren't added to a transaction if the address is within the transaction's stack.
By having a serparate stack per transaction we can prevent stack writes making their way to a parent transaction's write log, reducing the amount of memory that may need to be tracked and simplifying the Undo logic.

Ensuring that the write log does not contain stack writes is required for the open-memory validator.

#rb neil.henning

[CL 36005508 by ben clayton in ue5-main branch]
2024-09-04 09:09:31 -04:00
neil henning
8049970d3a Make UNetConnection::Describe transactionally safe.
#rb ben.clayton, Brandon.Schaefer

[CL 36003849 by neil henning in ue5-main branch]
2024-09-04 07:37:01 -04:00
john stiles
ab89cff8d7 [AutoRTFM] Update LockFreeFixedSizeAllocator to support AutoRTFM transactions.
This code is reachable from Verse by way of skeletal meshes/bones.

#rb ben.clayton

[CL 35973177 by john stiles in ue5-main branch]
2024-09-03 13:48:37 -04:00
ben clayton
b737e5c642 [Core/Containers] Use MALLOCLEAK_IGNORE_SCOPE() for TLS allocations that are never freed
Without this, these allocations are reported as leaks. Technically they are, but I assume they're small and infrequent enough to be ignored.

#rb Steve.Robb

[CL 35966221 by ben clayton in ue5-main branch]
2024-09-03 09:58:38 -04:00
steve robb
1916851fd5 Added FindArbitraryElement to TSet, TMap and TSortedMap.
Added tests.

#rb matt.breindel

[CL 35904526 by steve robb in ue5-main branch]
2024-08-29 15:34:52 -04:00
russell johnston
694e1c87fb Intrusive unset states for FScript* containers
#okforversepublic

[CL 35901171 by russell johnston in ue5-main branch]
2024-08-29 14:03:42 -04:00
david harvey
4818431979 Use shared cache for storage server platform file.
#jira UE-222485
#rnx
#rb tomasz.obrebski

[CL 35891369 by david harvey in ue5-main branch]
2024-08-29 04:19:21 -04:00
steve robb
1be01bcb1a Renamed container allocator function parameters to make them less ambiguous about whether they refer to a current state or new (desired) state, and refer to the 'num' (how many elements are constructed inside an allocation) or the 'max' (the total number of elements that the allocation could hold), as it was unclear.
Added a comment to clarify that TNonRelocatableInlineAllocator is itself non-trivially-relocatable, not that it's for non-trivially-relocatable elements.

#rb devin.doucette

[CL 35869531 by steve robb in ue5-main branch]
2024-08-28 11:34:16 -04:00
steve robb
e3d86b43ff Fixed TNonRelocatableInlineAllocator::ForElementType::MoveToEmpty to leave the moved-from allocator pointing to the inline storage (like after a default construction) rather than unallocated heap storage.
#rb devin.doucette

[CL 35863734 by steve robb in ue5-main branch]
2024-08-28 08:55:42 -04:00
henrik karlsson
277f0cf7fa Removed dllexported template instantiations when building with merged modules. Reason is because some of the console platform compilers don't handle this properly.
[CL 35832838 by henrik karlsson in ue5-main branch]
2024-08-27 14:41:00 -04:00
paul chipchase
d716db8c92 Add missing include
#rb Per.Larsson
#rnx

- This header could give a compiler error, depending on include order due to the use of TSizedHeapAllocator.

[CL 35830428 by paul chipchase in ue5-main branch]
2024-08-27 13:29:54 -04:00
michael balzer
148af1b356 TRingBuffer: Minor comments and spelling fixes
#jira none

[CL 35816606 by michael balzer in ue5-main branch]
2024-08-26 19:57:09 -04:00
edmund park
ffda486623 Adding TSparseArray::IndexOfByPredicate()
#rb Mieszko.Zielinski

[CL 35730427 by edmund park in ue5-main branch]
2024-08-21 22:45:57 -04:00
neil henning
2f665eee77 Add a SingleThreaded mode to TQueue and use it under AutoRTFM to fix a threading issue.
#rb ben.clayton

[CL 35622008 by neil henning in ue5-main branch]
2024-08-19 06:22:52 -04:00
sean gugler
fbc05b72bb TSpscQueue support for holding UniquePtr.
#rb Devin.Doucette
[FYI] ryan.mangin

[CL 35595662 by sean gugler in ue5-main branch]
2024-08-16 11:21:40 -04:00
steve robb
29bf1f37c1 Fixed a compile error in TDeque when using an allocator with NeedsElementType == false.
[FYI] elias.lozadabenavent

[CL 35531768 by steve robb in ue5-main branch]
2024-08-14 09:20:43 -04:00
steve robb
971ce0fcb0 Added intrusive unset states to various containers.
Modified TOptional's move/copy constructors to avoid moving/copying an element type in an intrusive unset optional state, in case the element type doesn't or can't support them.

#rb devin.doucette

[CL 35429693 by steve robb in ue5-main branch]
2024-08-09 13:53:38 -04:00
steve robb
e84983501e Undo changelist 35418085
[CL 35425736 by steve robb in ue5-main branch]
2024-08-09 12:08:27 -04:00
steve robb
f3298ae20d Added intrusive unset states to various containers.
Modified TOptional's move/copy constructors to avoid moving/copying an element type in an intrusive unset optional state, in case the element type doesn't or can't support them.

#rb devin.doucette

[CL 35418093 by steve robb in ue5-main branch]
2024-08-09 05:46:32 -04:00
bob tellez
398b837a25 [Backout] - CL35341721
[FYI] Devin.Doucette
Original CL Desc
-----------------------------------------------------------------
Added intrusive unset states to various containers

Re-submit of CL 33370680 by Steve.Robb.

#rb Steve.Robb

[CL 35345900 by bob tellez in ue5-main branch]
2024-08-06 13:25:37 -04:00
devin doucette
6954bf88dd Added intrusive unset states to various containers
Re-submit of CL 33370680 by Steve.Robb.

#rb Steve.Robb

[CL 35341734 by devin doucette in ue5-main branch]
2024-08-06 11:05:25 -04:00
steve robb
c1eb798468 Fixed moving arrays of const TArray elements into array of non-const TArray elements.
#rb devin.doucette

[CL 35109825 by steve robb in ue5-main branch]
2024-07-26 11:18:14 -04:00