<commit_before>//===--- Heap.cpp - Swift Language Heap Logic -----------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
//
// Implementations of the Swift heap
//
//===----------------------------------------------------------------------===//

#include "swift/Runtime/HeapObject.h"
#include "swift/Runtime/Heap.h"
#include "Private.h"
#include <stdlib.h>

using namespace swift;

__attribute__((visibility("hidden")))
malloc_zone_t _swift_zone = {
  NULL, // ignore -- for CF
  NULL, // ignore -- for CF
  _swift_zone_size,
  _swift_zone_malloc,
  _swift_zone_calloc,
  _swift_zone_valloc,
  _swift_zone_free,
  _swift_zone_realloc,
  _swift_zone_destroy,
  "SwiftZone", // name
  NULL, // optional batch malloc
  NULL, // optional batch free
  NULL, // FIXME -- struct malloc_introspection_t *
  0, // version
  NULL, // XXX -- add support for memalign and free_definite_size?
};

size_t swift::_swift_zone_size(malloc_zone_t *zone, const void *pointer) {
  auto z = malloc_default_zone();
  return z->size(z, pointer);
}

void *swift::_swift_zone_malloc(malloc_zone_t *zone, size_t size) {
  auto z = malloc_default_zone();
  return z->malloc(z, size);
}

void *swift::_swift_zone_calloc(malloc_zone_t *zone,
                                size_t count, size_t size) {
  auto z = malloc_default_zone();
  return z->calloc(z, count, size);
}

void *swift::_swift_zone_valloc(malloc_zone_t *zone, size_t size) {
  auto z = malloc_default_zone();
  return z->valloc(z, size);
}

void swift::_swift_zone_free(malloc_zone_t *zone, void *pointer) {
  auto z = malloc_default_zone();
  return z->free(z, pointer);
}

void *swift::_swift_zone_realloc(malloc_zone_t *zone,<commit_msg>Runtime: silence a harmless warning<commit_after>//===--- Heap.cpp - Swift Language Heap Logic -----------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
//
// Implementations of the Swift heap
//
//===----------------------------------------------------------------------===//

#include "swift/Runtime/HeapObject.h"
#include "swift/Runtime/Heap.h"
#include "Private.h"
#include <stdlib.h>

using namespace swift;

__attribute__((visibility("hidden")))
malloc_zone_t _swift_zone = {
  NULL, // ignore -- for CF
  NULL, // ignore -- for CF
  _swift_zone_size,
  _swift_zone_malloc,
  _swift_zone_calloc,
  _swift_zone_valloc,
  _swift_zone_free,
  _swift_zone_realloc,
  _swift_zone_destroy,
  "SwiftZone", // name
  NULL, // optional batch malloc
  NULL, // optional batch free
  NULL, // FIXME -- struct malloc_introspection_t *
  0, // version
  NULL, // XXX -- add support for memalign and free_definite_size?
  NULL, // XXX -- add support for memalign and free_definite_size?
};

size_t swift::_swift_zone_size(malloc_zone_t *zone, const void *pointer) {
  auto z = malloc_default_zone();
  return z->size(z, pointer);
}

void *swift::_swift_zone_malloc(malloc_zone_t *zone, size_t size) {
  auto z = malloc_default_zone();
  return z->malloc(z, size);
}

void *swift::_swift_zone_calloc(malloc_zone_t *zone,
                                size_t count, size_t size) {
  auto z = malloc_default_zone();
  return z->calloc(z, count, size);
}

void *swift::_swift_zone_valloc(malloc_zone_t *zone, size_t size) {
  auto z = malloc_default_zone();
  return z->valloc(z, size);
}

void swift::_swift_zone_free(malloc_zone_t *zone, void *pointer) {
  auto z = malloc_default_zone();
  return z->free(z, pointer);
}

void *swift::_swift_zone_realloc(malloc_zone_t *zone,
{'fraction_non_alphanumeric': 0.20206040739873565, 'fraction_numerical': 0.005151018496839147, 'mean_word_length': 2.6795865633074936, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3590903', 'n_tokens_mistral': 1416, 'n_tokens_neox': 1335, 'n_words': 353}