memalloc.c (670528cd789a9ce3d51e32edddc02e6b7ff358f9) | memalloc.c (ac08b882509e9f46241097df55edbce22e7f7646) |
---|---|
1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Kenneth Almquist. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 39 unchanged lines hidden (view full) --- 48#include <stdlib.h> 49#include <unistd.h> 50 51/* 52 * Like malloc, but returns an error when out of space. 53 */ 54 55pointer | 1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Kenneth Almquist. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 39 unchanged lines hidden (view full) --- 48#include <stdlib.h> 49#include <unistd.h> 50 51/* 52 * Like malloc, but returns an error when out of space. 53 */ 54 55pointer |
56ckmalloc(int nbytes) | 56ckmalloc(size_t nbytes) |
57{ 58 pointer p; 59 60 INTOFF; 61 p = malloc(nbytes); 62 INTON; 63 if (p == NULL) 64 error("Out of space"); --- 275 unchanged lines hidden --- | 57{ 58 pointer p; 59 60 INTOFF; 61 p = malloc(nbytes); 62 INTON; 63 if (p == NULL) 64 error("Out of space"); --- 275 unchanged lines hidden --- |