kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 4b2420097b7eb5c1511ded8f4116ba449a7adb71
parent 7828bd0cfccb65c4eaa7426c123e90edc006147f
Author: Joris Vink <joris@coders.se>
Date:   Thu, 27 Jun 2013 08:46:18 +0200

- Better spread load between all worker processes.
- Introduce own memory management system on top of malloc to keep track
  of all our allocations and free's. Later we should introduce a pooling
  mechanism for fixed size allocations (http_request comes to mind).
- Introduce ssl_cipher in configuration.

Memory usage is kind of high right now, but it seems its OpenSSL
doing it rather then Kore.

Diffstat:
includes/kore.h | 1-
src/mem.c | 18------------------
src/worker.c | 3---
3 files changed, 0 insertions(+), 22 deletions(-)

diff --git a/includes/kore.h b/includes/kore.h @@ -212,7 +212,6 @@ void *kore_calloc(size_t, size_t); void *kore_realloc(void *, size_t); void kore_mem_free(void *); void kore_mem_init(void); -void kore_mem_dump(void); time_t kore_date_to_time(char *); char *kore_time_to_date(time_t); diff --git a/src/mem.c b/src/mem.c @@ -124,29 +124,11 @@ kore_mem_free(void *ptr) if (mem->magic != KORE_MEM_MAGIC) fatal("kore_mem_free(): magic boundary not found"); - //t = kore_time_ms(); - //printf("mem#%d released, %ld ms old\n", mem->id, t - mem->t); - meminuse -= mem->clen; TAILQ_REMOVE(&memused, mem, list); free(mem); } -void -kore_mem_dump(void) -{ - printf("wrk#%d: %d bytes in use\n", worker->id, meminuse); - -#if 0 - now = kore_time_ms(); - TAILQ_FOREACH(mem, &memused, list) { - length = now - mem->t; - printf("wrk#%d: mem#%d %d bytes (%ld ms)\n", - worker->id, mem->id, mem->clen, length); - } -#endif -} - char * kore_strdup(const char *str) { diff --git a/src/worker.c b/src/worker.c @@ -242,9 +242,6 @@ kore_worker_entry(struct kore_worker *kw) kore_worker_acceptlock_release(); } - printf("%d: %d conn / %d mem\n", worker->id, - worker_active_connections, meminuse); - http_process(); for (c = TAILQ_FIRST(&disconnected); c != NULL; c = cnext) {