mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Added HandlerSocket plugin
- Fixed compiler errors - Modified Makefiles to be part of plugin directory - Some minor changes in database.cpp to use the new MariaDB handler interface
This commit is contained in:
37
plugin/handler_socket/libhsclient/allocator.hpp
Normal file
37
plugin/handler_socket/libhsclient/allocator.hpp
Normal file
@ -0,0 +1,37 @@
|
||||
|
||||
// vim:sw=2:ai
|
||||
|
||||
/*
|
||||
* Copyright (C) 2010 DeNA Co.,Ltd.. All rights reserved.
|
||||
* See COPYRIGHT.txt for details.
|
||||
*/
|
||||
|
||||
#ifndef DENA_ALLOCATOR_HPP
|
||||
#define DENA_ALLOCATOR_HPP
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#if 0
|
||||
extern "C" {
|
||||
#include <tlsf.h>
|
||||
};
|
||||
#define DENA_MALLOC(x) tlsf_malloc(x)
|
||||
#define DENA_REALLOC(x, y) tlsf_realloc(x, y)
|
||||
#define DENA_FREE(x) tlsf_free(x)
|
||||
#define DENA_NEWCHAR(x) static_cast<char *>(tlsf_malloc(x))
|
||||
#define DENA_DELETE(x) tlsf_free(x)
|
||||
typedef std::allocator<int> allocator_type;
|
||||
#endif
|
||||
|
||||
#if 1
|
||||
#define DENA_MALLOC(x) malloc(x)
|
||||
#define DENA_REALLOC(x, y) realloc(x, y)
|
||||
#define DENA_FREE(x) free(x)
|
||||
#define DENA_NEWCHAR(x) (new char[x])
|
||||
#define DENA_DELETE(x) (delete [] x)
|
||||
typedef std::allocator<int> allocator_type;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user