Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/Unipisa/CMM
13 July 2022, 09:41:13 UTC
  • Code
  • Branches (2)
  • Releases (8)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/SourceCode
    • refs/heads/master
    • 1.9
    • 1.8
    • 1.7
    • 1.6
    • 1.5
    • 1.4
    • 1.3
    • 1.1
  • 46aba77
  • /
  • cmm
  • /
  • test2.cc
Raw File Download
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
  • release
origin badgecontent badge Iframe embedding
swh:1:cnt:f5346bdc733e5d21ded6de9dcc33dd062eaa0350
origin badgedirectory badge Iframe embedding
swh:1:dir:c6c125692fc9b50fc40b85431abbfbf0e3ac8fd2
origin badgerevision badge
swh:1:rev:b2be05bf9df919837e45359f90f640bbd6975330
origin badgesnapshot badge
swh:1:snp:4ac4ed834489429d51fc0fd004f10ddbf78d807a
origin badgerelease badge
swh:1:rel:401c2dc3baa2602dc890a98b1c786551b7c92825
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
  • release
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: b2be05bf9df919837e45359f90f640bbd6975330 authored by Giuseppe Attardi on 06 June 1996, 09:07:03 UTC
1.6 -
Tip revision: b2be05b
test2.cc
/* The following program tests the ability of the garbage collector to correct
   derived pointers and pointers in the non-garbage collected heap.
*/

/* Externals */

#include <stdio.h>
#include <stdlib.h>
#include "cmm.h"

/* Cell type to build a list with. */

struct  cell : CmmObject  {
  cell  *next;
  int* value1;
  int  value2;
  cell();
  void traverse();
};

void
cell::traverse()
{
  CmmHeap *heap = Cmm::heap;
  heap->scavenge((CmmObject **)&next);
  heap->scavenge((CmmObject **)&value1);
}

cell::cell()
{
  next = 0;
  value1 = 0;
}

typedef  cell* cellptr;

/* Dynamic array of cellptr's that is not garbage collected */

struct  cella  {
  cellptr ptr[50000];
};

Cmm  dummy(1048576, 2147483647, 1048576, 35, 30, CMM_HEAPROOTS+CMM_STATS,
	   0, 0);

main()
{
	cella*  pointers = new cella;
	cellptr  cl = 0, cp;
	int i;

	/* Allocate 50000 cells referenced by an array in the non-gc heap */
	for  (i = 0; i < 50000; i++)  {
	   cp = new cell;
	   pointers->ptr[i] = cp;
	   cp->value1 = 0;
	   cp->value2 = i;
	}

	/* Make a list of 50000 cells that each point into themseleves. */
	for  (i = 0; i < 50000; i++)  {
	   cp = new cell;
	   cp = new cell;
	   cp = new cell;
	   cp = new cell;
	   cp->next = cl;
	   cp->value1 = &cp->value2;
	   cp->value2 = i;
	   cl = cp;
	}

	/* Verify that objects referenced by pointers still exist */
	for  (i = 0; i < 50000; i++)  {
	   if  (pointers->ptr[i]->value2 != i)  abort();
	}

	/* Verify that cell list is correct correct */
	for  (i = 0; i < 50000; i++)  {
	   if  (cl->value2 != *(cl->value1))  abort();
	   cl = cl->next;
	}
	exit(0);
}

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API

back to top