~ubuntu-branches/ubuntu/hardy/ghostscript/hardy

« back to all changes in this revision

Viewing changes to src/zvmem.c

  • Committer: Bazaar Package Importer
  • Author(s): Till Kamppeter
  • Date: 2007-11-22 12:17:43 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20071122121743-cd70s3ypq0r243mp
Tags: 8.61.dfsg.1-0ubtuntu1
* New upstream release
  o Final 8.61 release
* debian/patches/09_ijs_krgb_support.dpatch: Adapted to upstream changes.
* debian/rules: Updated CUPS-related variables for "make install" calls.
* debian/rules: Remove /usr/include/ghostscript from the ghostscript
  package, they go into lings-dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
   San Rafael, CA  94903, U.S.A., +1(415)492-9861, for further information.
12
12
*/
13
13
 
14
 
/* $Id: zvmem.c 8094 2007-07-01 17:18:18Z alexcher $ */
 
14
/* $Id: zvmem.c 8250 2007-09-25 13:31:24Z giles $ */
15
15
/* "Virtual memory" operators */
16
16
#include "stat_.h" /* get system header early to avoid name clash on Cygwin */
17
17
#include "ghost.h"
31
31
 
32
32
/* Define whether we validate memory before/after save/restore. */
33
33
/* Note that we only actually do this if DEBUG is set and -Z? is selected. */
34
 
private const bool I_VALIDATE_BEFORE_SAVE = true;
35
 
private const bool I_VALIDATE_AFTER_SAVE = true;
36
 
private const bool I_VALIDATE_BEFORE_RESTORE = true;
37
 
private const bool I_VALIDATE_AFTER_RESTORE = true;
 
34
static const bool I_VALIDATE_BEFORE_SAVE = true;
 
35
static const bool I_VALIDATE_AFTER_SAVE = true;
 
36
static const bool I_VALIDATE_BEFORE_RESTORE = true;
 
37
static const bool I_VALIDATE_AFTER_RESTORE = true;
38
38
 
39
39
/* 'Save' structure */
40
40
typedef struct vm_save_s vm_save_t;
46
46
                    vm_save_enum_ptrs, vm_save_reloc_ptrs, gsave);
47
47
 
48
48
/* Clean up the stacks and validate storage. */
49
 
private void
 
49
static void
50
50
ivalidate_clean_spaces(i_ctx_t *i_ctx_p)
51
51
{
52
52
    if (gs_debug_c('?')) {
99
99
}
100
100
 
101
101
/* <save> restore - */
102
 
private int restore_check_operand(os_ptr, alloc_save_t **, gs_dual_memory_t *);
103
 
private int restore_check_stack(const i_ctx_t *i_ctx_p, const ref_stack_t *, const alloc_save_t *, bool);
104
 
private void restore_fix_stack(ref_stack_t *, const alloc_save_t *, bool);
 
102
static int restore_check_operand(os_ptr, alloc_save_t **, gs_dual_memory_t *);
 
103
static int restore_check_stack(const i_ctx_t *i_ctx_p, const ref_stack_t *, const alloc_save_t *, bool);
 
104
static void restore_fix_stack(ref_stack_t *, const alloc_save_t *, bool);
105
105
int
106
106
zrestore(i_ctx_t *i_ctx_p)
107
107
{
177
177
    return 0;
178
178
}
179
179
/* Check the operand of a restore. */
180
 
private int
 
180
static int
181
181
restore_check_operand(os_ptr op, alloc_save_t ** pasave,
182
182
                      gs_dual_memory_t *idmem)
183
183
{
197
197
    return 0;
198
198
}
199
199
/* Check a stack to make sure all its elements are older than a save. */
200
 
private int
 
200
static int
201
201
restore_check_stack(const i_ctx_t *i_ctx_p, const ref_stack_t * pstack,
202
202
                    const alloc_save_t * asave, bool is_estack)
203
203
{
305
305
 *
306
306
 * Note that this procedure is only called if restore_check_stack succeeded.
307
307
 */
308
 
private void
 
308
static void
309
309
restore_fix_stack(ref_stack_t * pstack, const alloc_save_t * asave,
310
310
                  bool is_estack)
311
311
{
352
352
}
353
353
 
354
354
/* - vmstatus <save_level> <vm_used> <vm_maximum> */
355
 
private int
 
355
static int
356
356
zvmstatus(i_ctx_t *i_ctx_p)
357
357
{
358
358
    os_ptr op = osp;
377
377
/* ------ Non-standard extensions ------ */
378
378
 
379
379
/* <save> .forgetsave - */
380
 
private int
 
380
static int
381
381
zforgetsave(i_ctx_t *i_ctx_p)
382
382
{
383
383
    os_ptr op = osp;