summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/pal/inc/pal.h9
-rw-r--r--src/pal/src/memory/heap.cpp23
-rw-r--r--src/pal/tests/palsuite/filemapping_memmgt/CMakeLists.txt2
-rw-r--r--src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/CMakeLists.txt7
-rw-r--r--src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test1/CMakeLists.txt17
-rw-r--r--src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test1/test1.cpp56
-rw-r--r--src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test1/testinfo.dat15
-rw-r--r--src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test3/CMakeLists.txt17
-rw-r--r--src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test3/test3.cpp72
-rw-r--r--src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test3/testinfo.dat17
-rw-r--r--src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test4/CMakeLists.txt17
-rw-r--r--src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test4/test4.cpp76
-rw-r--r--src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test4/testinfo.dat18
-rw-r--r--src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test5/CMakeLists.txt17
-rw-r--r--src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test5/test5.cpp63
-rw-r--r--src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test5/testinfo.dat18
-rw-r--r--src/pal/tests/palsuite/paltestlist.txt4
17 files changed, 0 insertions, 448 deletions
diff --git a/src/pal/inc/pal.h b/src/pal/inc/pal.h
index 0357464812..20befc9de4 100644
--- a/src/pal/inc/pal.h
+++ b/src/pal/inc/pal.h
@@ -2827,20 +2827,11 @@ VirtualQuery(
OUT PMEMORY_BASIC_INFORMATION lpBuffer,
IN SIZE_T dwLength);
-PALIMPORT
-VOID
-PALAPI
-RtlMoveMemory(
- IN PVOID Destination,
- IN CONST VOID *Source,
- IN SIZE_T Length);
-
#define MoveMemory memmove
#define CopyMemory memcpy
#define FillMemory(Destination,Length,Fill) memset((Destination),(Fill),(Length))
#define ZeroMemory(Destination,Length) memset((Destination),0,(Length))
-
PALIMPORT
HANDLE
PALAPI
diff --git a/src/pal/src/memory/heap.cpp b/src/pal/src/memory/heap.cpp
index ccee77ff50..42681bc6bf 100644
--- a/src/pal/src/memory/heap.cpp
+++ b/src/pal/src/memory/heap.cpp
@@ -40,29 +40,6 @@ SET_DEFAULT_DEBUG_CHANNEL(MEM);
/*++
Function:
- RtlMoveMemory
-
-See MSDN doc.
---*/
-VOID
-PALAPI
-RtlMoveMemory(
- IN PVOID Destination,
- IN CONST VOID *Source,
- IN SIZE_T Length)
-{
- PERF_ENTRY(RtlMoveMemory);
- ENTRY("RtlMoveMemory(Destination:%p, Source:%p, Length:%d)\n",
- Destination, Source, Length);
-
- memmove(Destination, Source, Length);
-
- LOGEXIT("RtlMoveMemory returning\n");
- PERF_EXIT(RtlMoveMemory);
-}
-
-/*++
-Function:
HeapCreate
See MSDN doc.
diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/CMakeLists.txt
index 4f996bded0..a0f1eb8ad4 100644
--- a/src/pal/tests/palsuite/filemapping_memmgt/CMakeLists.txt
+++ b/src/pal/tests/palsuite/filemapping_memmgt/CMakeLists.txt
@@ -17,10 +17,8 @@ add_subdirectory(MapViewOfFile)
add_subdirectory(OpenFileMappingA)
add_subdirectory(OpenFileMappingW)
add_subdirectory(ProbeMemory)
-add_subdirectory(RtlMoveMemory)
add_subdirectory(UnmapViewOfFile)
add_subdirectory(VirtualAlloc)
add_subdirectory(VirtualFree)
add_subdirectory(VirtualProtect)
add_subdirectory(VirtualQuery)
-
diff --git a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/CMakeLists.txt
deleted file mode 100644
index 393074b4ee..0000000000
--- a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/CMakeLists.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-cmake_minimum_required(VERSION 2.8.12.2)
-
-add_subdirectory(test1)
-add_subdirectory(test3)
-add_subdirectory(test4)
-add_subdirectory(test5)
-
diff --git a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test1/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test1/CMakeLists.txt
deleted file mode 100644
index 12aba80d0a..0000000000
--- a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test1/CMakeLists.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-cmake_minimum_required(VERSION 2.8.12.2)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(SOURCES
- test1.cpp
-)
-
-add_executable(paltest_rtlmovememory_test1
- ${SOURCES}
-)
-
-add_dependencies(paltest_rtlmovememory_test1 coreclrpal)
-
-target_link_libraries(paltest_rtlmovememory_test1
- ${COMMON_TEST_LIBRARIES}
-)
diff --git a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test1/test1.cpp b/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test1/test1.cpp
deleted file mode 100644
index 7fc56510d8..0000000000
--- a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test1/test1.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/*=============================================================
-**
-** Source: test1.c
-**
-** Purpose: Simple test -- have two 128 blocks of memory allocated. Then
-** move one block to the other and check to see that the data was not
-** corrupted.
-**
-**
-**============================================================*/
-
-#include <palsuite.h>
-
-enum Memory
-{
- MEMORY_AMOUNT = 128
-};
-
-int __cdecl main(int argc, char *argv[])
-{
- char NewAddress[MEMORY_AMOUNT];
- char OldAddress[MEMORY_AMOUNT];
- int i;
- char temp;
-
- if(PAL_Initialize(argc, argv))
- {
- return FAIL;
- }
-
- /* Put some data into the block we'll be moving */
- memset(OldAddress, 'X', MEMORY_AMOUNT);
-
- /* Move the block to the NewAddress */
- RtlMoveMemory(NewAddress, OldAddress, MEMORY_AMOUNT);
-
- /* Check to ensure the data didn't get corrupted */
- for(i=0; i<MEMORY_AMOUNT; ++i)
- {
- if(NewAddress[i] != 'X')
- {
- temp = NewAddress[i];
- Fail("ERROR: When the memory was moved to a new location, the "
- "data which was stored in it was somehow corrupted. "
- "Character %d should have been 'X' but instead is %c.\n",
- i, temp);
- }
- }
-
- PAL_Terminate();
- return PASS;
-}
diff --git a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test1/testinfo.dat b/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test1/testinfo.dat
deleted file mode 100644
index 645d46c968..0000000000
--- a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test1/testinfo.dat
+++ /dev/null
@@ -1,15 +0,0 @@
-# Licensed to the .NET Foundation under one or more agreements.
-# The .NET Foundation licenses this file to you under the MIT license.
-# See the LICENSE file in the project root for more information.
-
-Version = 1.0
-Section = Filemapping_memmgt
-Function = RtlMoveMemory
-Name = Positive test for RtlMoveMemory API
-TYPE = DEFAULT
-EXE1 = test1
-Description
-= Simple test -- have two 128 blocks of memory allocated. Then
-= move one block to the other and check to see that the data was not
-= corrupted.
-
diff --git a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test3/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test3/CMakeLists.txt
deleted file mode 100644
index 3773cb79cd..0000000000
--- a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test3/CMakeLists.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-cmake_minimum_required(VERSION 2.8.12.2)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(SOURCES
- test3.cpp
-)
-
-add_executable(paltest_rtlmovememory_test3
- ${SOURCES}
-)
-
-add_dependencies(paltest_rtlmovememory_test3 coreclrpal)
-
-target_link_libraries(paltest_rtlmovememory_test3
- ${COMMON_TEST_LIBRARIES}
-)
diff --git a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test3/test3.cpp b/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test3/test3.cpp
deleted file mode 100644
index 279c0c1199..0000000000
--- a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test3/test3.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/*=============================================================
-**
-** Source: test3.c
-**
-** Purpose: Allocate 128 bytes of memory and store data in it. Move 10
-** other bytes of memory to that location. Check that the first 10 bytes
-** carried over their data and that the other 118 were unchanged.
-**
-**
-**============================================================*/
-
-#include <palsuite.h>
-
-enum Memory
-{
- NEW_MEMORY_AMOUNT = 128,
- OLD_MEMORY_AMOUNT = 10
-};
-
-int __cdecl main(int argc, char *argv[])
-{
- char NewAddress[NEW_MEMORY_AMOUNT];
- char OldAddress[OLD_MEMORY_AMOUNT];
- int i;
-
-
- if(PAL_Initialize(argc, argv))
- {
- return FAIL;
- }
-
- /* Put some data into the block we'll be moving */
- memset(OldAddress, 'X', OLD_MEMORY_AMOUNT);
-
- /* Put some data into the block we're moving to */
- memset(NewAddress, 'Z', NEW_MEMORY_AMOUNT);
-
- /* Move the block to the NewAddress */
- RtlMoveMemory(NewAddress, OldAddress, OLD_MEMORY_AMOUNT);
-
- /* Check to ensure the moved data didn't get corrupted */
- for(i=0; i<OLD_MEMORY_AMOUNT; ++i)
- {
- if(NewAddress[i] != 'X')
- {
- Fail("ERROR: When the memory was moved to a new location, the "
- "data which was stored in it was somehow corrupted. "
- "Character %d should have been 'X' but instead is %c.\n",
- i, NewAddress[i]);
- }
- }
-
- /* Check to ensure the memory which didn't move didn't get corrupted */
- for(i=OLD_MEMORY_AMOUNT; i<NEW_MEMORY_AMOUNT; ++i)
- {
- if(NewAddress[i] != 'Z')
- {
- Fail("ERROR: When the memory was moved to a new location, the "
- "data which was stored in it was somehow corrupted. "
- "Character %d should have been 'Z' but instead is %c.\n",
- i, NewAddress[i]);
- }
- }
-
-
- PAL_Terminate();
- return PASS;
-}
diff --git a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test3/testinfo.dat b/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test3/testinfo.dat
deleted file mode 100644
index fb56f2e985..0000000000
--- a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test3/testinfo.dat
+++ /dev/null
@@ -1,17 +0,0 @@
-# Licensed to the .NET Foundation under one or more agreements.
-# The .NET Foundation licenses this file to you under the MIT license.
-# See the LICENSE file in the project root for more information.
-
-Version = 1.0
-Section = Filemapping_memmgt
-Function = RtlMoveMemory
-Name = Positive test for RtlMoveMemory API, move a small block to large
-TYPE = DEFAULT
-EXE1 = test3
-Description
-= Allocate 128 bytes of memory and store data in it. Move 10
-= other bytes of memory to that location. Check that the first 10 bytes
-= carried over their data and that the other 118 were unchanged.
-
-
-
diff --git a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test4/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test4/CMakeLists.txt
deleted file mode 100644
index 0b4414b08b..0000000000
--- a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test4/CMakeLists.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-cmake_minimum_required(VERSION 2.8.12.2)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(SOURCES
- test4.cpp
-)
-
-add_executable(paltest_rtlmovememory_test4
- ${SOURCES}
-)
-
-add_dependencies(paltest_rtlmovememory_test4 coreclrpal)
-
-target_link_libraries(paltest_rtlmovememory_test4
- ${COMMON_TEST_LIBRARIES}
-)
diff --git a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test4/test4.cpp b/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test4/test4.cpp
deleted file mode 100644
index b6e1ecd6f7..0000000000
--- a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test4/test4.cpp
+++ /dev/null
@@ -1,76 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/*=============================================================
-**
-** Source: test4.c
-**
-** Purpose: Test simple overlapping. Move the first 50 bytes of a
-** piece of memory to the latter 50 bytes. ie i -> i+50 Check to make sure
-** no data is lost.
-**
-**
-**============================================================*/
-
-#include <palsuite.h>
-
-enum Memory
-{
- MEMORY_AMOUNT = 128
-};
-
-int __cdecl main(int argc, char *argv[])
-{
- char* NewAddress;
- char OldAddress[MEMORY_AMOUNT];
- int i;
-
- if(PAL_Initialize(argc, argv))
- {
- return FAIL;
- }
-
- NewAddress = OldAddress+50;
-
- /* Put some data into the block we'll be moving
- The first 50 byes will be 'X' and the rest set to 'Z'
- */
- memset(OldAddress, 'X', 50);
- memset(NewAddress, 'Z', MEMORY_AMOUNT-50);
-
- /* Move the first 50 bytes of OldAddress to OldAddress+50. This
- is to test that the source and destination addresses can overlap.
- */
- RtlMoveMemory(NewAddress, OldAddress, 50);
-
- /* Check to ensure the moved data didn't get corrupted
- The first 50 bytes should be 'X'
- */
- for(i=0; i<50; ++i)
- {
- if(NewAddress[i] != 'X')
- {
- Fail("ERROR: When the memory was moved to a new location, the "
- "data which was stored in it was somehow corrupted. "
- "Character %d should have been 'X' but instead is %c.\n",
- i, NewAddress[i]);
- }
- }
-
- /* The rest of the memory should be 'Z' */
- for(i=50; i<MEMORY_AMOUNT-50; ++i)
- {
- if(NewAddress[i] != 'Z')
- {
-
- Fail("ERROR: When the memory was moved to a new location, the "
- "data which was stored in it was somehow corrupted. "
- "Character %d should have been 'Z' but instead is %c.\n",
- i, NewAddress[i]);
- }
- }
-
- PAL_Terminate();
- return PASS;
-}
diff --git a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test4/testinfo.dat b/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test4/testinfo.dat
deleted file mode 100644
index 56b82f2083..0000000000
--- a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test4/testinfo.dat
+++ /dev/null
@@ -1,18 +0,0 @@
-# Licensed to the .NET Foundation under one or more agreements.
-# The .NET Foundation licenses this file to you under the MIT license.
-# See the LICENSE file in the project root for more information.
-
-Version = 1.0
-Section = Filemapping_memmgt
-Function = RtlMoveMemory
-Name = Positive test for RtlMoveMemory API, test that overlapping works
-TYPE = DEFAULT
-EXE1 = test4
-Description
-= Test simple overlapping. Move the first 50 bytes of a
-= piece of memory to the latter 50 bytes. ie i -> i+50 Check to make sure
-= no data is lost.
-
-
-
-
diff --git a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test5/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test5/CMakeLists.txt
deleted file mode 100644
index f3c38f2e6a..0000000000
--- a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test5/CMakeLists.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-cmake_minimum_required(VERSION 2.8.12.2)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(SOURCES
- test5.cpp
-)
-
-add_executable(paltest_rtlmovememory_test5
- ${SOURCES}
-)
-
-add_dependencies(paltest_rtlmovememory_test5 coreclrpal)
-
-target_link_libraries(paltest_rtlmovememory_test5
- ${COMMON_TEST_LIBRARIES}
-)
diff --git a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test5/test5.cpp b/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test5/test5.cpp
deleted file mode 100644
index affcb0abc9..0000000000
--- a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test5/test5.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/*=============================================================
-**
-** Source: test5.c
-**
-** Purpose: Do more complex overlapping. Move a section of memory back so
-** that it actually ends up overlapping itself.
-**
-**
-**============================================================*/
-
-#include <palsuite.h>
-
-enum Memory
-{
- MEMORY_AMOUNT = 128
-};
-
-int __cdecl main(int argc, char *argv[])
-{
- char* NewAddress;
- char* SectionToMove;
- char TheMemory[MEMORY_AMOUNT];
- int i;
-
- if(PAL_Initialize(argc, argv))
- {
- return FAIL;
- }
-
- NewAddress = TheMemory;
- SectionToMove = TheMemory+50;
-
- /* Put some data into the first 50 bytes */
- memset(TheMemory, 'X', 50);
-
- /* Put some data into the rest of the memory */
- memset(SectionToMove, 'Z', MEMORY_AMOUNT-50);
-
- /* Move the section in the middle of TheMemory back to the start of
- TheMemory -- but have it also overlap itself. (ie. the section
- to be move is overlapping itself)
- */
- RtlMoveMemory(NewAddress, SectionToMove, MEMORY_AMOUNT-50);
-
- /* Check to ensure the moved data didn't get corrupted */
- for(i=0; i<MEMORY_AMOUNT-50; ++i)
- {
- if(NewAddress[i] != 'Z')
- {
- Fail("ERROR: When the memory was moved to a new location, the "
- "data which was stored in it was somehow corrupted. "
- "Character %d should have been 'Z' but instead is %c.\n",
- i, NewAddress[i]);
- }
- }
-
- PAL_Terminate();
- return PASS;
-}
diff --git a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test5/testinfo.dat b/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test5/testinfo.dat
deleted file mode 100644
index a4ba99a29d..0000000000
--- a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test5/testinfo.dat
+++ /dev/null
@@ -1,18 +0,0 @@
-# Licensed to the .NET Foundation under one or more agreements.
-# The .NET Foundation licenses this file to you under the MIT license.
-# See the LICENSE file in the project root for more information.
-
-Version = 1.0
-Section = Filemapping_memmgt
-Function = RtlMoveMemory
-Name = Positive test for RtlMoveMemory API, test that overlapping works
-TYPE = DEFAULT
-EXE1 = test5
-Description
-= Do more complex overlapping. Move a section of memory back so
-= that it actually ends up overlapping itself.
-
-
-
-
-
diff --git a/src/pal/tests/palsuite/paltestlist.txt b/src/pal/tests/palsuite/paltestlist.txt
index 4a75b67c17..ebc3592c67 100644
--- a/src/pal/tests/palsuite/paltestlist.txt
+++ b/src/pal/tests/palsuite/paltestlist.txt
@@ -495,10 +495,6 @@ filemapping_memmgt/MapViewOfFile/test5/paltest_mapviewoffile_test5
filemapping_memmgt/MapViewOfFile/test6/paltest_mapviewoffile_test6
filemapping_memmgt/ProbeMemory/test1/paltest_probememory_test1
filemapping_memmgt/ProbeMemory/ProbeMemory_neg1/paltest_probememory_probememory_neg1
-filemapping_memmgt/RtlMoveMemory/test1/paltest_rtlmovememory_test1
-filemapping_memmgt/RtlMoveMemory/test3/paltest_rtlmovememory_test3
-filemapping_memmgt/RtlMoveMemory/test4/paltest_rtlmovememory_test4
-filemapping_memmgt/RtlMoveMemory/test5/paltest_rtlmovememory_test5
filemapping_memmgt/UnmapViewOfFile/test1/paltest_unmapviewoffile_test1
filemapping_memmgt/UnmapViewOfFile/test2/paltest_unmapviewoffile_test2
filemapping_memmgt/VirtualAlloc/test1/paltest_virtualalloc_test1