Changes

22 bytes added ,  10:35, 4 August 2017
m
Corrected standard functions definitions
Line 63: Line 63:  
|-
 
|-
 
|memset
 
|memset
|<code>void memset(void *str, int c, size_t n)</code>  
+
|<code>void *memset(void *str, int c, size_t n)</code>  
 
|Call OSBlockSet (Looks like it does the same thing as standart memset). Copies the character c (an unsigned char) to the first n characters of the String pointed to by the argument str. See  [http://www.tutorialspoint.com/c_standard_library/c_function_memset.htm]
 
|Call OSBlockSet (Looks like it does the same thing as standart memset). Copies the character c (an unsigned char) to the first n characters of the String pointed to by the argument str. See  [http://www.tutorialspoint.com/c_standard_library/c_function_memset.htm]
 
|-
 
|-
 
|memclr
 
|memclr
|<code>void memclr(void *str, size_t n)</code>  
+
|<code>void *memclr(void *str, size_t n)</code>  
 
|Like memset but sets the memory to 0. Call OSBlockSet (memset) with 0 as second arg (r4).
 
|Like memset but sets the memory to 0. Call OSBlockSet (memset) with 0 as second arg (r4).
 
|-
 
|-
 
|memcpy
 
|memcpy
|<code>void memcpy(void *str1, const void *str2, size_t n)</code>  
+
|<code>void *memcpy(void *str1, const void *str2, size_t n)</code>  
 
|Call OSBlockMove with  1 as the  fourth arg (r6).Copies n characters from memory area str2 to memory area str1. See [http://www.tutorialspoint.com/c_standard_library/c_function_memcpy.htm]
 
|Call OSBlockMove with  1 as the  fourth arg (r6).Copies n characters from memory area str2 to memory area str1. See [http://www.tutorialspoint.com/c_standard_library/c_function_memcpy.htm]
 
|-
 
|-
 
|memmove
 
|memmove
|<code>void memmove(void *str1, const void *str2, size_t n)</code>  
+
|<code>void *memmove(void *str1, const void *str2, size_t n)</code>  
 
|Call OSBlockMove with 1 as the fourth arg (r6) exactly the same as memcpy.
 
|Call OSBlockMove with 1 as the fourth arg (r6) exactly the same as memcpy.
 
|-
 
|-
 
|MEMAllocFromDefaultHeapEx
 
|MEMAllocFromDefaultHeapEx
|<code>int MEMAllocFromDefaultHeapEx(int size, int alignment)</code>  
+
|<code>void *MEMAllocFromDefaultHeapEx(uint32_t size, int alignment)</code>  
 
|Allocates memory on the heap with the given size and memory alignment. This is typically in the 0x4??????? memory area
 
|Allocates memory on the heap with the given size and memory alignment. This is typically in the 0x4??????? memory area
 
|-
 
|-
 
|MEMFreeToDefaultHeap
 
|MEMFreeToDefaultHeap
|<code>void MEMFreeToDefaultHeap(int addr)</code>  
+
|<code>void MEMFreeToDefaultHeap(void* addr)</code>  
 
|Frees previously heap memory. addr is the address returned by MEMAllocFromDefaultHeapEx()
 
|Frees previously heap memory. addr is the address returned by MEMAllocFromDefaultHeapEx()
 
|-
 
|-
 
|OSAllocFromSystem
 
|OSAllocFromSystem
|<code>int OSAllocFromSystem(int size, int alignment)</code>  
+
|<code>void *OSAllocFromSystem(uint32_t size, int alignment)</code>  
 
|Allocates system memory with the given size and memory alignment. This is typically in the 0x10?????? memory area
 
|Allocates system memory with the given size and memory alignment. This is typically in the 0x10?????? memory area
 
|-
 
|-
 
|OSFreeToSystem
 
|OSFreeToSystem
|<code>void OSFreeToSystem(int addr)</code>  
+
|<code>void OSFreeToSystem(void* addr)</code>  
 
|Frees previously allocated system memory. addr is the address returned by OSAllocFromSystem()
 
|Frees previously allocated system memory. addr is the address returned by OSAllocFromSystem()
 
|-
 
|-
53

edits