memory/build/mozjemalloc_compat.c
author Matt Woodrow <mwoodrow@mozilla.com>
Sat, 30 Jun 2012 15:06:13 +1200
changeset 98026 6e8c5c011767c7d7e5072dc27cb192750ce347c0
parent 96046 627b93e8a41cbe3ed3b87ad25ea9f7cfbeea1c20
child 110544 712c7dbe7c288497f91e9386f05041de587b6a58
permissions -rw-r--r--
Bug 539356 - Part 24 - Don't paint android widgets that aren't being composited, or at the front. r=roc

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "mozilla/Types.h"
#include "jemalloc_types.h"

extern int je_mallctl(const char*, void*, size_t*, void*, size_t);

MOZ_EXPORT_API (void)
jemalloc_stats(jemalloc_stats_t *stats)
{
  size_t size = sizeof(stats->mapped);
  je_mallctl("stats.mapped", &stats->mapped, &size, NULL, 0);
  je_mallctl("stats.allocated", &stats->allocated, &size, NULL, 0);
  stats->committed = -1;
  stats->dirty = -1;
}