Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
mxq/test_mxqd_control.c
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
36 lines (26 sloc)
631 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define _GNU_SOURCE | |
#include <assert.h> | |
#include "mxqd.h" | |
#define MEMORY_TOTAL 20480 | |
#define MEMORY_MAX_PER_SLOT 2048 | |
#define SLOTS 10 | |
void __init_server(struct mxq_server *server) | |
{ | |
server->memory_total = MEMORY_TOTAL; | |
server->memory_limit_slot_soft = MEMORY_MAX_PER_SLOT; | |
server->slots = SLOTS; | |
server->memory_avg_per_slot = MEMORY_TOTAL / SLOTS; | |
} | |
static void test_mxqd_control(void) | |
{ | |
struct mxq_server _server = { 0 }; | |
struct mxq_server *server; | |
server = &_server; | |
__init_server(server); | |
assert(1); | |
} | |
int main(void) | |
{ | |
test_mxqd_control(); | |
return 0; | |
} |