]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Library/BaseMemoryLib.h
• BaseMemoryLib:
[mirror_edk2.git] / MdePkg / Include / Library / BaseMemoryLib.h
CommitLineData
878ddf1f 1/** @file\r
24e25d11 2 Memory-only library functions with no library constructor/destructor\r
878ddf1f 3\r
24e25d11 4 Copyright (c) 2006, Intel Corporation\r
5 All rights reserved. This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
878ddf1f 9\r
24e25d11 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
878ddf1f 12\r
24e25d11 13 Module Name: BaseMemoryLib.h\r
878ddf1f 14\r
15**/\r
16\r
17#ifndef __BASE_MEMORY_LIB__\r
18#define __BASE_MEMORY_LIB__\r
19\r
20/**\r
24e25d11 21 Copies a source buffer to a destination buffer, and returns the destination buffer.\r
878ddf1f 22\r
24e25d11 23 This function copies Length bytes from SourceBuffer to DestinationBuffer, and returns\r
24 DestinationBuffer. The implementation must be reentrant, and it must handle the case\r
25 where SourceBuffer overlaps DestinationBuffer.\r
26 If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT(). \r
27 If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT(). \r
878ddf1f 28\r
24e25d11 29 @param DestinationBuffer Pointer to the destination buffer of the memory copy.\r
30 @param SourceBuffer Pointer to the source buffer of the memory copy.\r
31 @param Length Number of bytes to copy from SourceBuffer to DestinationBuffer.\r
878ddf1f 32\r
24e25d11 33 @return DestinationBuffer.\r
878ddf1f 34\r
35**/\r
36VOID *\r
37EFIAPI\r
38CopyMem (\r
24e25d11 39 OUT VOID *DestinationBuffer,\r
40 IN CONST VOID *SourceBuffer,\r
41 IN UINTN Length\r
878ddf1f 42 );\r
43\r
44/**\r
24e25d11 45 Fills a target buffer with a byte value, and returns the target buffer.\r
878ddf1f 46\r
47 This function fills Length bytes of Buffer with Value, and returns Buffer.\r
24e25d11 48