Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions plugins/experimental/cookie_remap/cookie_remap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,6 @@ using namespace std;

const int OVECCOUNT = 30; // We support $1 - $9 only, and this needs to be 3x that

///////////////////////////////////////////////////////////////////////////////
// Helpers for memory management (to make sure pcre uses the TS APIs).
//
inline void *
ink_malloc(size_t s)
{
return TSmalloc(s);
}

inline void
ink_free(void *s)
{
return TSfree(s);
}

class UrlComponents
{
public:
Expand Down Expand Up @@ -182,13 +167,6 @@ class UrlComponents
}
};

void
setup_memory_allocation()
{
pcre_malloc = &ink_malloc;
pcre_free = &ink_free;
}

enum operation_type { UNKNOWN = -1, EXISTS = 1, NOTEXISTS, REGEXP, STRING, BUCKET };

enum target_type {
Expand Down Expand Up @@ -914,8 +892,6 @@ using OpsQueue = std::vector<const op *>;
TSReturnCode
TSRemapInit(TSRemapInterface *api_info, char *errbuf, int errbuf_size)
{
setup_memory_allocation();

return TS_SUCCESS;
}

Expand Down
23 changes: 0 additions & 23 deletions plugins/regex_remap/regex_remap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -638,28 +638,6 @@ struct RemapInstance {
std::string filename;
};

///////////////////////////////////////////////////////////////////////////////
// Helpers for memory management (to make sure pcre uses the TS APIs).
//
inline void *
ts_malloc(size_t s)
{
return TSmalloc(s);
}

inline void
ts_free(void *s)
{
return TSfree(s);
}

void
setup_memory_allocation()
{
pcre_malloc = &ts_malloc;
pcre_free = &ts_free;
}

///////////////////////////////////////////////////////////////////////////////
// Initialize the plugin.
//
Expand All @@ -677,7 +655,6 @@ TSRemapInit(TSRemapInterface *api_info, char *errbuf, int errbuf_size)
return TS_ERROR;
}

setup_memory_allocation();
TSDebug(PLUGIN_NAME, "Plugin is successfully initialized");
return TS_SUCCESS;
}
Expand Down
15 changes: 0 additions & 15 deletions plugins/regex_revalidate/regex_revalidate.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,6 @@
#define LOG_ROLL_INTERVAL 86400
#define LOG_ROLL_OFFSET 0

static inline void *
ts_malloc(size_t s)
{
return TSmalloc(s);
}

static inline void
ts_free(void *s)
{
return TSfree(s);
}

typedef struct invalidate_t {
const char *regex_text;
pcre *regex;
Expand Down Expand Up @@ -519,9 +507,6 @@ TSPluginInit(int argc, const char *argv[])
TSDebug(LOG_PREFIX, "Plugin registration succeeded");
}

pcre_malloc = &ts_malloc;
pcre_free = &ts_free;

main_cont = TSContCreate(main_handler, NULL);
TSContDataSet(main_cont, (void *)pstate);
TSHttpHookAdd(TS_HTTP_CACHE_LOOKUP_COMPLETE_HOOK, main_cont);
Expand Down