Changeset 1841 for trunk/psLib/src/image/psImage.c
- Timestamp:
- Sep 21, 2004, 1:15:04 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/image/psImage.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/image/psImage.c
r1840 r1841 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1.4 4$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-09-21 2 2:30:19$12 * @version $Revision: 1.45 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-09-21 23:15:04 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 22 22 23 23 #include "psMemory.h" 24 #include "psAbort.h"25 24 #include "psError.h" 26 25 #include "psImage.h" … … 50 49 psImage* image = (psImage* ) psAlloc(sizeof(psImage)); 51 50 52 if (image == NULL) {53 psAbort(__func__, " : Line %d - Failed to allocate memory", __LINE__);54 }55 56 51 p_psMemSetDeallocator(image, (psFreeFcn) imageFree); 57 52 58 53 image->data.V = psAlloc(sizeof(void *) * numRows); 59 if (image->data.V == NULL) {60 psFree(image);61 psAbort(__func__, " : Line %d - Failed to allocate memory", __LINE__);62 }63 54 64 55 image->rawDataBuffer = psAlloc(area * elementSize); 65 if (image->rawDataBuffer == NULL) {66 psFree(image);67 psFree(image->data.V);68 psAbort(__func__, " : Line %d - Failed to allocate memory", __LINE__);69 }70 56 71 57 // set the row pointers.
Note:
See TracChangeset
for help on using the changeset viewer.
