Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/C/Linux/mm/damon/   (Open Source Betriebssystem Version 6.17.9©)  Datei vom 24.10.2025 mit Größe 868 B image not shown  

Quelle  modules-common.c   Sprache: C

 
// SPDX-License-Identifier: GPL-2.0
/*
 * Common Code for DAMON Modules
 *
 * Author: SeongJae Park <sj@kernel.org>
 */


#include <linux/damon.h>

#include "modules-common.h"

/*
 * Allocate, set, and return a DAMON context for the physical address space.
 * @ctxp: Pointer to save the point to the newly created context
 * @targetp: Pointer to save the point to the newly created target
 */

int damon_modules_new_paddr_ctx_target(struct damon_ctx **ctxp,
  struct damon_target **targetp)
{
 struct damon_ctx *ctx;
 struct damon_target *target;

 ctx = damon_new_ctx();
 if (!ctx)
  return -ENOMEM;

 if (damon_select_ops(ctx, DAMON_OPS_PADDR)) {
  damon_destroy_ctx(ctx);
  return -EINVAL;
 }

 target = damon_new_target();
 if (!target) {
  damon_destroy_ctx(ctx);
  return -ENOMEM;
 }
 damon_add_target(ctx, target);

 *ctxp = ctx;
 *targetp = target;
 return 0;
}

Messung V0.5
C=96 H=95 G=95

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.