vmopen.c 778 B

1234567891011121314151617181920212223242526
  1. /*************************************************************************
  2. * Copyright (c) 2011 AT&T Intellectual Property
  3. * All rights reserved. This program and the accompanying materials
  4. * are made available under the terms of the Eclipse Public License v1.0
  5. * which accompanies this distribution, and is available at
  6. * https://www.eclipse.org/legal/epl-v10.html
  7. *
  8. * Contributors: Details at https://graphviz.org
  9. *************************************************************************/
  10. #include <vmalloc/vmalloc.h>
  11. #include <stdlib.h>
  12. /** Open a new region of allocation.
  13. *
  14. * @returns A newly allocated Vmalloc or NULL on failure
  15. */
  16. Vmalloc_t *vmopen(void) {
  17. Vmalloc_t *vm = calloc(1, sizeof(*vm));
  18. if (vm == NULL) {
  19. return NULL;
  20. }
  21. return vm;
  22. }