/* DLIFE Copyright (C) 2000 Richard W.M. Jones * and other authors listed in the ``AUTHORS'' file. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id: state.h,v 1.1 2002/04/05 14:40:28 rich Exp $ */ #ifndef state_h #define state_h #include "dlink.h" #include "types.h" struct state { /* The number of cycles we have been running for. */ unsigned long long cell_cycle; /* The number of cells alive (running and on the alive list). */ int nr_cells_alive; /* The number of cells allocated (alive + undivided daughters). */ int nr_cells_allocated; /* The list of cells currently alive (running). Some cells may also * exist in an undivided state. */ dlink_list_t alive_list; /* The same list of cells, kept in order of best (fewest errors) to * worse (most errors). This allows the grim reaper to quickly remove * dying cells. */ dlink_list_t best_list; /* The soup. */ byte_t *soup; /* Number of bytes in soup, and number of bytes free in soup. */ int soup_size; int soup_free; /* Filename of the soup image (for this thread). */ char *filename; /* Thread number (first thread is number 0). */ int thread_num; }; extern struct state *state_malloc (int _soup_size, int thread_num); extern void state_free (struct state *); #endif /* state_h */