Protocol Buffers - Google's data interchange format (grpc依赖) https://developers.google.com/protocol-buffers/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 lines
547 B

/*
* upb - a minimalist implementation of protocol buffers.
*
* Copyright (c) 2012 Google Inc. See LICENSE for details.
* Author: Josh Haberman <jhaberman@gmail.com>
*
* Linux-kernel implementations of some stdlib.h functions.
*/
#include <linux/slab.h>
#ifndef UPB_LINUX_STDLIB_H
#define UPB_LINUX_STDLIB_H
static inline void *malloc(size_t size) { return kmalloc(size, GFP_ATOMIC); }
static inline void free(void *p) { kfree(p); }
static inline void *realloc(void *p, size_t size) {
return krealloc(p, size, GFP_ATOMIC);
}
#endif