libft
Loading...
Searching...
No Matches
Functions
ft_memory.h File Reference

Low-level memory manipulation functions. More...

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void ft_bzero (void *s, size_t n)
 Sets a block of memory to zero.
 
void * ft_calloc (size_t nmemb, size_t size)
 Allocates and zeroes memory for an array.
 
void * ft_memchr (const void *s, int c, size_t n)
 Scans memory for a specific byte.
 
int ft_memcmp (const void *s1, const void *s2, size_t n)
 Compares two memory blocks.
 
void * ft_memcpy (void *dest, const void *src, size_t n)
 Copies memory from source to destination.
 
void * ft_memmove (void *dest, const void *src, size_t n)
 Copies memory safely, handling overlapping regions.
 
void * ft_memset (void *s, int c, size_t n)
 Fills memory with a constant byte.
 
void * ft_realloc (void *ptr, size_t old_size, size_t new_size)
 Resizes a memory block.
 

Detailed Description

Low-level memory manipulation functions.

Author
Toonsa
Date
2025/04/05

This header declares utility functions for memory operations such as allocation, zeroing, copying, moving, comparison, and searching.

These functions replicate or improve upon standard C library behaviors while ensuring better consistency and safety in custom C projects.