Sha256: 26521841c79e2b1d057949fd4b5bfe84299cd5f68a4838229af444ffcbf3f60e

Contents?: true

Size: 699 Bytes

Versions: 26

Compression:

Stored size: 699 Bytes

Contents

// Protocol Buffers - Google's data interchange format
// Copyright 2023 Google LLC.  All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

#include "upb/mem/alloc.h"

#include <stdlib.h>

// Must be last.
#include "upb/port/def.inc"

static void* upb_global_allocfunc(upb_alloc* alloc, void* ptr, size_t oldsize,
                                  size_t size) {
  UPB_UNUSED(alloc);
  UPB_UNUSED(oldsize);
  if (size == 0) {
    free(ptr);
    return NULL;
  } else {
    return realloc(ptr, size);
  }
}

upb_alloc upb_alloc_global = {&upb_global_allocfunc};

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
grpc-1.70.1 third_party/upb/upb/mem/alloc.c
grpc-1.69.0 third_party/upb/upb/mem/alloc.c
grpc-1.69.0.pre1 third_party/upb/upb/mem/alloc.c
grpc-1.68.1 third_party/upb/upb/mem/alloc.c
grpc-1.67.0 third_party/upb/upb/mem/alloc.c
grpc-1.67.0.pre1 third_party/upb/upb/mem/alloc.c
grpc-1.66.0 third_party/upb/upb/mem/alloc.c
grpc-1.66.0.pre5 third_party/upb/upb/mem/alloc.c
grpc-1.66.0.pre3 third_party/upb/upb/mem/alloc.c
grpc-1.60.2 third_party/upb/upb/mem/alloc.c
grpc-1.61.3 third_party/upb/upb/mem/alloc.c
grpc-1.62.3 third_party/upb/upb/mem/alloc.c
grpc-1.63.2 third_party/upb/upb/mem/alloc.c
grpc-1.64.3 third_party/upb/upb/mem/alloc.c
grpc-1.65.2 third_party/upb/upb/mem/alloc.c
grpc-1.65.1 third_party/upb/upb/mem/alloc.c
grpc-1.65.0 third_party/upb/upb/mem/alloc.c
grpc-1.65.0.pre2 third_party/upb/upb/mem/alloc.c
grpc-1.65.0.pre1 third_party/upb/upb/mem/alloc.c
grpc-1.63.0 third_party/upb/upb/mem/alloc.c