1
0
mirror of https://github.com/golang/go synced 2024-11-23 05:40:04 -07:00
go/usr/rsc/mem/stack.c

23 lines
360 B
C
Raw Normal View History

// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#include "malloc.h"
void*
stackalloc(uint32 n)
{
void *v;
v = alloc(n);
//printf("stackalloc %d = %p\n", n, v);
return v;
}
void
stackfree(void *v)
{
//printf("stackfree %p\n", v);
free(v);
}