<commit_before>//
//  memory_management.h
//
//  Created by <NAME> on 12/10/13.
//  Copyright (c) 2013 <NAME>. All rights reserved.
//

#ifndef _memory_management_h
#define _memory_management_h

#define _XOPEN_SOURCE 700
#define MEMORY_MANAGEMENT_ENVIRONMENT 1

#include <pthread.h>

#ifdef __cplusplus
extern "C" {
#endif

#define MEMORY_MANAGEMENT_RETAIN(o) memory_management_retain((o))
#define MEMORY_MANAGEMENT_RELEASE(o) memory_management_release((o))
#define MEMORY_MANAGEMENT_GET_RETAIN_COUNT(o) memory_management_get_retain_count((o))
	
/* Use this to set the dealloc function */
#define MEMORY_MANAGEMENT_ATTRIBUTE_SET_DEALLOC_FUNCTION(o, function) memory_management_attributes_set_dealloc_function((o), (function))

/* Use this allocate memory */
#define MEMORY_MANAGEMENT_ALLOC(size) memory_management_alloc((size))
/* Use this to retain (increment) a reference */
#define retain(o) MEMORY_MANAGEMENT_RETAIN((o))
/* Use this to release (decrement) a reference */
#define release(o) MEMORY_MANAGEMENT_RELEASE((o))
	
	void *memory_management_alloc(size_t size);
	void *memory_management_retain(void *);
	void memory_management_release(void *);
	unsigned long long memory_management_get_retain_count(const void *);
	
	/* Use this to set a custom destructor */
	typedef void (*deallocf)(void *);
	void memory_management_attributes_set_dealloc_function(void *, deallocf);
	<commit_msg>Insert compiler __attribute__ to functions’ declarations<commit_after>//
//  memory_management.h
//
//  Created by <NAME> on 12/10/13.
//  Copyright (c) 2013 <NAME>. All rights reserved.
//

#ifndef _memory_management_h
#define _memory_management_h

#define _XOPEN_SOURCE 700
#define MEMORY_MANAGEMENT_ENVIRONMENT 1

#include <pthread.h>

#ifdef __cplusplus
extern "C" {
#endif

#define MEMORY_MANAGEMENT_RETAIN(o) memory_management_retain((o))
#define MEMORY_MANAGEMENT_RELEASE(o) memory_management_release((o))
#define MEMORY_MANAGEMENT_GET_RETAIN_COUNT(o) memory_management_get_retain_count((o))
	
/* Use this to set the dealloc function */
#define MEMORY_MANAGEMENT_ATTRIBUTE_SET_DEALLOC_FUNCTION(o, function) memory_management_attributes_set_dealloc_function((o), (function))

/* Use this allocate memory */
#define MEMORY_MANAGEMENT_ALLOC(size) memory_management_alloc((size))
/* Use this to retain (increment) a reference */
#define retain(o) MEMORY_MANAGEMENT_RETAIN((o))
/* Use this to release (decrement) a reference */
#define release(o) MEMORY_MANAGEMENT_RELEASE((o))
	
	void *memory_management_alloc(size_t size) __attribute__ ((malloc));
	void *memory_management_retain(void *) __attribute__((nonnull (1)));
	void memory_management_release(void *) __attribute__((nonnull (1)));
	unsigned long long memory_management_get_retain_count(const void *) __attribute__((nonnull (1)));
	
	/* Use this to set a custom destructor */
	typedef void (*deallocf)(void *) __attribute__((nonnull (1)));
	void memory_management_attributes_set_dealloc_function(void *, deallocf) __attribute__((nonnull (1)));
	
{'fraction_non_alphanumeric': 0.1091091091091091, 'fraction_numerical': 0.011011011011011011, 'mean_word_length': 7.059139784946237, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '1360606', 'n_tokens_mistral': 1037, 'n_tokens_neox': 982, 'n_words': 225}