This is a simple libc implementation for educational purposes.
- void *malloc (unsigned long) - allocates size bytes of uninitialized storage
- void *calloc(unsigned long) - allocates memory for an array of num objects of size size and initializes it to all bits zero
- void *realoc(unsigned long) - reallocates the given area of memory
- void free(void* ptr) - deallocates the space previously allocated by malloc(), calloc(), realoc()
Implementation of Mark&Sweep algorithm for memory manager
- unique_ptr() - creates a unique_ptr that owns nothing
- unique_ptr( std::nullptr_t ) - creates a unique_ptr that owns nothing
- unique_ptr( pointer p ) - creates a unique_ptr that owns pointer
- operator* - dereferences pointer to the managed object
- operator-> - dereferences pointer to the managed object
- operator bool - checks if there is an associated managed object
- get() - returns a pointer to the managed object
- release() - returns a pointer to the managed object and releases the ownership
- void *memcpy(void *dest, const void *src, size_t n) - copies bytes between buffers. From src to dest
- void *memset(void *buf, char ch, size_t count) - sets buffers to a specified character
- char *cat(char *dest, const char *src) - appends a string
- size_t len(const char *str) - gets the length of a string
- char *cpy(char *dest, const char *src) - copies a string
- char *cpyn(char *dest, const char *src, size_t num) - copies the first num characters of source to destination
- size_t spn(const char *str, char *accept) - teturns the length of the initial portion of str1 which consists only of characters that are part of accept
- size_t cspn(const char *str, char *not_accept) - Scans str1 for the first occurrence of any of the characters that are part of str2, returning the number of characters of str1 read before this first occurrence
- char *ch(char *str, char ch) - returns a pointer to the first occurrence of character in the C string str