infoutil.c

来自「刚才是说明 现在是安装程序在 LINUX环境下进行编程的MPICH安装文件」· C语言 代码 · 共 50 行

C
50
字号
/* -*- Mode: C; c-basic-offset:4 ; -*- *//*  $Id: infoutil.c,v 1.7 2001/09/18 18:58:48 ashton Exp $ * *  (C) 2001 by Argonne National Laboratory. *      See COPYRIGHT in top-level directory. */#include "mpiimpl.h"#include "mpiinfo.h"/*#include <stdio.h>*//* This is the utility file for info that contains the basic info items   and storage management */#ifndef MPID_INFO_PREALLOC #define MPID_INFO_PREALLOC 8#endif/* Preallocated info objects */MPID_Info MPID_Info_direct[MPID_INFO_PREALLOC];MPIU_Object_alloc_t MPID_Info_mem = { 0, 0, 0, 0, MPID_INFO, 				      sizeof(MPID_Info), MPID_Info_direct,                                      MPID_INFO_PREALLOC, };/* Free an info structure */void MPIU_Info_free( MPID_Info *info_ptr ){    MPID_Info *curr_ptr, *last_ptr;    curr_ptr = info_ptr->next;    last_ptr = info_ptr;    /* printf( "Returning info %x\n", info_ptr->id ); */    /* First, free the string storage */    while (curr_ptr) {	MPIU_Free(curr_ptr->key);	MPIU_Free(curr_ptr->value);	last_ptr = curr_ptr;	curr_ptr = curr_ptr->next;    }    /* Lock because updating avail list */    MPID_Allocation_lock();    /* Return info to the avail list */    last_ptr->next	= (MPID_Info *)MPID_Info_mem.avail;    MPID_Info_mem.avail	= (void *)info_ptr;    /* Unlock */    MPID_Allocation_unlock();}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?