bin/varnishd/storage/storage_simple.c
struct object *
SML_MkObject(const struct stevedore *stv, struct objcore *oc, void *ptr)
{
	struct object *o;

	CHECK_OBJ_NOTNULL(stv, STEVEDORE_MAGIC);
	AN(stv->methods);
	CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC);

	assert(PAOK(ptr));

	o = ptr;
	INIT_OBJ(o, OBJECT_MAGIC);

	VTAILQ_INIT(&o->list);

	oc->stobj->stevedore = stv;
	oc->stobj->priv = o;
	oc->stobj->priv2 = 0;
	return (o);
}
/*--------------------------------------------------------------------
 * This function is called by stevedores ->allocobj() method, which
 * very often will be SML_allocobj() below, to convert a slab
 * of storage into object which the stevedore can then register in its
 * internal state, before returning it to STV_NewObject().
 * As you probably guessed: All this for persistence.
 */
This function is called by stevedores ->allocobj() method, which
very often will be SML_allocobj() below, to convert a slab
of storage into object which the stevedore can then register in its
internal state, before returning it to STV_NewObject().
As you probably guessed: All this for persistence.
This function is called by stevedores - > allocobj () method which very often will be SML_allocobj () below to convert a slab of storage into object which the stevedore can then register in its internal state before returning it to STV_NewObject () . As you probably guessed : All this for persistence .
struct object *
SML_MkObject(const struct stevedore *stv, struct objcore *oc, void *ptr)
{
	struct object *o;
	CHECK_OBJ_NOTNULL(stv, STEVEDORE_MAGIC);
	AN(stv->methods);
	CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC);
	assert(PAOK(ptr));
	o = ptr;
	INIT_OBJ(o, OBJECT_MAGIC);
	VTAILQ_INIT(&o->list);
	oc->stobj->stevedore = stv;
	oc->stobj->priv = o;
	oc->stobj->priv2 = 0;
	return (o);
}
struct object * SML_MkObject ( const struct stevedore * stv , struct objcore * oc , void * ptr ) { struct object * o ; CHECK_OBJ_NOTNULL ( stv , STEVEDORE_MAGIC ) ; AN ( stv -> methods ) ; CHECK_OBJ_NOTNULL ( oc , OBJCORE_MAGIC ) ; assert ( PAOK ( ptr ) ) ; o = ptr ; INIT_OBJ ( o , OBJECT_MAGIC ) ; VTAILQ_INIT ( & o -> list ) ; oc -> stobj -> stevedore = stv ; oc -> stobj -> priv = o ; oc -> stobj -> priv2 = 0 ; return ( o ) ; }
This function is called by stevedores ->allocobj() method, which
 very often will be SML_allocobj() below, to convert a slab
 of storage into object which the stevedore can then register in its
 internal state, before returning it to STV_NewObject().
This function is called by stevedores - > allocobj () method which very often will be SML_allocobj () below to convert a slab of storage into object which the stevedore can then register in its internal state before returning it to STV_NewObject () .