<commit_before>#include "mem_ops.h"
#include "utils.h"


// based in OpenBSD reallocarray() function http://man.openbsd.org/reallocarray.3
void *xallocaarray (size_t nmemb, size_t size) 
{
	if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && nmemb > 0 && SIZE_MAX / nmemb < size) 
	{
		DEBUG("integer overflow block");
		return NULL;
	}

	void *ptr = alloca (nmemb*size);

	if (ptr == NULL)
	{ 
		DEBUG("error in xallocarray() function")
		exit(1);
	}

	return ptr;
}



// based in OpenBSD reallocarray() function http://man.openbsd.org/reallocarray.3
void *xmallocarray (size_t nmemb, size_t size) 
{
	if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && nmemb > 0 && SIZE_MAX / nmemb < size) 
	{
		DEBUG("integer overflow block");
		return NULL;
	}

	void *ptr = malloc (nmemb*size);

	if (ptr == NULL)
	{
 
		DEBUG("error in xmallocarray() function")
		exit(1);<commit_msg>update error handler in memory functions<commit_after>#include "mem_ops.h"
#include "utils.h"


// based in OpenBSD reallocarray() function http://man.openbsd.org/reallocarray.3
void *xallocaarray (size_t nmemb, size_t size) 
{
	if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && nmemb > 0 && SIZE_MAX / nmemb < size) 
	{
		DEBUG("integer overflow block");
		return NULL;
	}

	void *ptr = alloca (nmemb*size);

	if (ptr == NULL)
	{ 
		DEBUG("error in xallocarray() function");
		exit(1);
	}

	return ptr;
}



// based in OpenBSD reallocarray() function http://man.openbsd.org/reallocarray.3
void *xmallocarray (size_t nmemb, size_t size) 
{
	if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && nmemb > 0 && SIZE_MAX / nmemb < size) 
	{
		DEBUG("integer overflow block");
		return NULL;
	}

	void *ptr = malloc (nmemb*size);

	if (ptr == NULL)
	{
 
		DEBUG("error in xmallocarray() function");
		exit(1);
{'fraction_non_alphanumeric': 0.15079801871216292, 'fraction_numerical': 0.006604292790313704, 'mean_word_length': 3.9135135135135135, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2678017', 'n_tokens_mistral': 768, 'n_tokens_neox': 701, 'n_words': 172}