summaryrefslogtreecommitdiff
path: root/src/vm/comutilnative.cpp
AgeCommit message (Collapse)AuthorFilesLines
2019-01-22Move MemoryFailPoint to shared CoreLib partition (#22104)Filip Navara1-0/+20
* Move MemoryFailPoint to shared CoreLib partition. * Split MemoryFailPoint into Unix and Windows versions. * Replace MemoryFailPoint.GetMemorySettings FCall with GC.GetSegmentSize to make sharing with CoreRT easier.
2019-01-20Cleanup array related FCalls (#22097)Jan Kotas1-31/+0
* Cleanup Array FCalls * Disable outdated CoreFX tests https://github.com/dotnet/corefx/pull/34700
2018-10-11fix issue where we wouldn't throw OOM after failing to allocate more space ↵David Mason1-1/+4
for finalize queue (#20363)
2018-04-02Added a new API to provide memory information that GC records. This (#17326)Maoni Stephens1-0/+12
is to be used by BCL for deciding when to trim memory usage in pooling code
2018-03-19Switch over to managed Marvin implementation for string hashing (#17029)Jan Kotas1-131/+0
2018-03-06Remove libuuid usage (#16643)Jan Vorlicek1-1/+1
* Remove libuuid usage This change removes dependency on the libuuid library that is used for GUID creation only. It implements it using a random generator instead. It also modifies return type of PAL_Random to VOID since it was always returning TRUE and none of the existing callers were checking it. 1. Port the GUID creation to managed code. 2. Modify the PAL_Random to have 6 times better perf so that the perf of the CoCreateGuid that is used in the native runtime doesn't degrade that much w.r.t the previous state when the libuuid was used. 3. Use Interop.GetRandomBytes on Unix and fix Windows
2018-02-26Use overriden double/float GetHashCode for default struct hashcodes (#16550)Jan Kotas1-44/+50
Fixes #16545
2018-01-28Improve Interlocked.Exchange<T> (#16058)mikedn1-40/+0
Replace TypedReference with Unsafe.As, it generates far less code and, with the help of AggresiveInlining, it allows Exchange<T> to inline.
2017-11-20Move TaskToApm to shared CoreLib partition (#15113)Jan Kotas1-48/+0
- Get TaskToApm in sync with CoreFX copy and move it to shared CoreLib partition - Delete redundant __Error file - Delete remaining uses of InternalBlockCopy and replace it with BlockCopy
2017-11-06Cleanup BCLDebug (#14868)Jan Kotas1-19/+0
- Delete BCLDebug and related types since it was replaced by the public System.Diagnostic.Debug - Preserve commented out or conditionally compiled logging in a few place where it seemed potentially useful Fixes #11389
2017-10-24Cleanup BCLDebugJan Kotas1-5/+2
- Delete correctness, performance and safe handle stacktrace logging - Change remaining BCLDebug.Assert uses to Debug.Assert
2017-09-18Remove now dead ParseNumbers code in runtimeStephen Toub1-645/+0
2017-08-27Remove always defined FEATURE_RANDOMIZE_STRING_HASHING define (#13491)Dan Moseley1-187/+14
* Remove always defined FEATURE_RANDOMIZE_STRING_HASHING * Fully remove randomized hashing * Leftovers * Remove additionalEntropy from HashSortKey as it was always 0 * Remove additionalEntropy from HashString as it was always 0 * Change to private, as not in fact called by reflection in .NET Core * Fix build break due to FCDECLn * Revert removed QCALL * Remove unused strlen parameter
2017-08-23Fixed Equals/GetHashCode bug for struct. (#13164)Jim Ma1-13/+160
Other than `ContainsPointers` and `IsNotTightlyPacked`, added two new conditions for checking whether a valuetype can go to fast path or not. Following are the details of these 2 conditions: - Check whether a valuetype contains a Single/Double field. If it does, we cannot go to fast path. Floating point numbers have special `Equals` and `GetHashCode` implementation. We cannot simply compare floating point numbers via bits (e.g. +0.0 should equal to -0.0, but their underlying bits are different). - Check whether an user-defined valuetype overrides `Equals` or `GetHashCode`. If it does, we cannot go to fast path. Because `Equals` or `GetHashCode` result may be different to bit comparison. To find Single/Double fields and overridden `Equals`/`GetHashCode`, we start a DFS to go through the whole hierachy of the source valuetype, and cache the result to `MethodTable`. Fix #11452
2017-03-28[Local GC] Use standard C++ types (bool) and consistent types (void*) on the ↵Sean Gillespie1-4/+4
interface (#10463) * [Local GC] BOOL -> bool on IGCHeap * [Local GC] size_t -> void* on IGCHeap * [Local GC] Silence warnings by being explicit about BOOl -> bool conversions * Address code review feedback: FinalizeAppDomain BOOL -> bool * Fix warnings * Address code review feedback: 1) Fix a missed default parameter (FALSE) on a parameter of type bool, 2) Fix invocations of the diagnostic callbacks to use boolean literals instead of TRUE and FALSE, 3) Fix various invocations of GC interface methods in the VM to use boolean literals instead of TRUE and FALSE * Address code review feedback: fix inconsistency
2017-03-25Add Interlocked.MemoryBarrierProcessWide (#10476)Jan Kotas1-0/+14
Contributes to #16799
2017-03-09Improve span copy of pointers and structs containing pointers (#9999)Koundinya Veluri1-1/+13
Improve span copy of pointers and structs containing pointers Fixes #9161 PR #9786 fixes perf of span copy of types that don't contain references
2017-02-14Optimizing Span.Clear using memsetahsonkhan1-0/+7
2017-02-12Remove remainder of FEATURE_CORECLR (tool missed some files, also comments)danmosemsft1-1/+1
2017-02-12Remove always defined FEATURE_EXCEPTIONDISPATCHINFOdanmosemsft1-2/+0
2017-02-11Revert "Remove always defined FEATURE_CORESYSTEM"danmosemsft1-0/+6
This reverts commit 751771a8976f909af772e35c167bd7e3ffbe44c8.
2017-02-10Remove always defined FEATURE_CORECLRdanmosemsft1-101/+0
2017-02-10Remove always defined FEATURE_CORESYSTEMdanmosemsft1-6/+0
2016-09-23update JIT_MemSet/MemCpy, Buffer::BlockCopy and Buffer::InternalBlock… (#7198)Xiangyang (Mark) Guo1-0/+8
* update JIT_MemSet/MemCpy, Buffer::BlockCopy and Buffer::InternalBlockCopy * add header comments
2016-09-08Introduce an interface separating the GC and the VM,Sean Gillespie1-27/+27
modifying the VM to utilize this interface. Introduce an interface separating the GC and the rest of the VM Remove static members of both IGCHeap and IGCHeapInternal and move the management of the singular GC heap to the VM. Rename uses of IGCHeap in the VM to GCHeapHolder, as well as other misc. renames throughout the VM and GC. Split each interface function into categories, document them, use consistent formatting across the interface Undo some accidental find/replace collateral damage Remove all ifdefs from the GC interface Deduplicate function declarations between IGCHeap and IGCHeapInternal, expose AllocAlign8 through the interface and the reference to alloc_context to repair the ARM build Paper cut: false -> nullptr Repair the ARM and x86 builds Rename GCHeapHolder -> GCHeapUtilities and address documentation feedback Rebase against master Rename gcholder.h/cpp -> gcheaputilities.h/cpp Fix an uninitialized field on alloc_context causing test failures on clang Rename the include guard for gcheaputilities.h Un-breaks SOS by making the following changes: 1) Instructs the DAC to look for IGCHeap::gcHeapType by name, instead of assuming that it exists near g_pGCHeap, 2) Eliminate all virtual calls on IGCHeap in the DAC, since we cannot dispatch on an object in another process, 3) Because of 2, expose the number of generations past the GC interface using a static variable on IGCHeap that the DAC can read directly. repair the Windows build
2016-08-29added GC.GetAllocatedBytesForCurrentThread APIMaoni Stephens1-0/+18
2016-05-07Buffer.BlockCopy: Avoid double-typechecks for arrays of same type (#4807)James Ko1-3/+6
2016-05-03Generalize Buffer.BlockCopy optimization for either src or dst (#4736)James Ko1-11/+23
* Generalize Buffer.BlockCopy optimization for either src or dst
2016-02-10Add a fast path for byte[] to Buffer.BlockCopyJan Kotas1-13/+29
2016-01-27Update license headersdotnet-bot1-4/+3
2016-01-19Fix override detection to work reliably for JITed mscorlibJan Kotas1-8/+27
2016-01-19Tweak a few more aspects of Stream.Read/WriteAsync perf improvementsstephentoub1-2/+2
- Remove older reflection-based detection of overrides from SyncStream - Remove Tuple allocation from RunReadWriteTaskWhenReady - Fix spelling of Overridden - Add a few comments
2016-01-19Add generic detection of Stream.{Begin|End}{Read|Write} overridesJan Kotas1-0/+54
2015-09-25Implement basic collation on top of ICUMatt Ellis1-3/+24
This change adds support for basic Unicode collation support, built on top of ICU. Windows and ICU have different collation models, and the windows model does not correspond 1:1 with the ICU model, so in addition to differences in sort weights between the two platforms, the CompareOptions enum does not map nicely to ICU options. For now, we only map CompareOptions.None, CompareOptions.IgnoreCase as well as CompareOptions.Ordinal and CompareOptions.OrdinalIngoreCase, other CompareOptions are ignored during collation. In addition to collation support, I have enabed the randomized string hashing code (using Marvin32 + a per app domain seed) so that string hashcodes are not predictable across runs.
2015-03-03Introduce FC_TypedByRef for passing TypedReferences as FCall argumentsJan Kotas1-2/+2
FC_TypedByRef is defined as TypedByRef& for now to workaround the mismatch between managed and native struct calling convention.
2015-02-25Allow users to specify a no GC region (on behalf of maonis)Jan Kotas1-0/+35
This mode lets users to specify an allocation amount for which no GCs would happen. Sometimes during the absolutely performance critical paths users have the desire to allocate without interference from the GC. If there is enough memory, GC will not kick in while this mode is set. [tfs-changeset: 1421386]
2015-02-04Avoid unnecessary work for identical locations in Buffer.BlockCopyBen Adams1-2/+5
Perform validity checks to ensure parameters are correct but short-circuit out memmove when exactly the same data would be copied to the same location. There are a number of occasions; which can be intentional or unintentional, where the buffer being copied is the same place - e.g an internal buffer is the same as the return buffer, and there is no need to call memmove's overwrite safe copy. Generally the call to BlockCopy will be in a library so it is more practical to enable the check here rather than alter all the calling functions, including 3rd party libraries to preform additional checks.
2015-01-30Initial commit to populate CoreCLR repo dotnet-bot1-0/+3102
[tfs-changeset: 1407945]