efun - mappings - allocate_mapping

MudOS v21c2

allocate_mapping(3) MudOS v21c2�� (5 Sep 1994)

������:
    �� allocate_mapping() - Ԥ������ (pre-allocate) һ���ڴ��һ��ӳ�� (mapping).
���﷨:
    �� mapping allocate_mapping( int size );

    �� ӳ�� allocate_mapping( ���� size );

���÷�:
    �� ����һ��Ԥ������ size ��Ԫ�� (elements) ��ӳ��.
     
�� ����:
      ���� mapping x;
      ���� int y = 200;

      ���� x = allocate_mapping(y);

    �� y �����ӳ��ij�ʼ��С. ������Ѿ�֪��ӳ���ж��, ʹ�� allocate_mapping �DZȽϺõķ��� (�ڷ������� 200 ��Ԫ��) , ��Ϊһ�ξ��趨��Ҫ���õ��ڴ�, ���ڴ��ʹ�����DZȽ���Ч�ʵ�. �����Ҫ��ӳ�䴢�� 200 ������, �� allocate_mapping �ǽ��ʺ϶���Ч�ʵķ�ʽ.

    �� ע�� !�� �����Ԥ�ƻ�ɾ��ӳ���е������Ԫ��, ��Ӧ���� x = ([]) ����ʼ�������е�ӳ�� x, ����ñ��� allocate_mapping().

    �� ע��: �ڴ�, ʵ����ӳ��Ĵ�С��û�������.

    �� x = allocate_mapping( 200 ); ���� x = ([]);

���ο�: ������:
    �� Spock @ FF 96.Oct.14.�� (printed 3/16/95)

�ص���һҳ