added comments
This commit is contained in:
parent
44b6a96057
commit
99697d949e
3 changed files with 5 additions and 5 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: thrieg < thrieg@student.42mulhouse.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/11/25 11:47:23 by thrieg #+# #+# */
|
||||
/* Updated: 2025/12/08 15:37:18 by thrieg ### ########.fr */
|
||||
/* Updated: 2025/12/08 16:02:18 by thrieg ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ void *realloc(void *ptr, size_t size)
|
|||
{
|
||||
header->size = available_space;
|
||||
}
|
||||
pthread_mutex_unlock(&g_mut);
|
||||
pthread_mutex_unlock(&g_mut); // doesn't need to stay locked because the user is not supposed to free or realloc this ptr or change its content before this realloc returns
|
||||
if (g_state.patern)
|
||||
ft_memset((char *)ptr + original_space, g_state.patern, header->size - original_space); // should I use original_size to only perturb the actually requested bytes instead of the bytes I allocate?
|
||||
return (ptr);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue