Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 1.19 KB

28171-function-has-more-than-one-page-macro-instance.md

File metadata and controls

22 lines (15 loc) · 1.19 KB
title description keywords ms.date f1_keywords
C28171 Warning
Warning C28171 The function has more than one instance of PAGED_CODE or PAGED_CODE_LOCKED.
warnings listed WDK PREfast for Drivers
errors listed WDK PREfast for Drivers
04/20/2017
C28171

C28171

warning C28171: The function has more than one instance of PAGED_CODE or PAGED_CODE_LOCKED

This warning indicates that there is more than one instance of the PAGED_CODE or PAGED_CODE_LOCKED macro in a function. This error is reported at the second or subsequent instances of the PAGED_CODE or PAGED_CODE_LOCKED macro.

Functions in a paged section must have exactly one instance of the PAGED_CODE or PAGED_CODE_LOCKED macro and the macro should appear at the beginning of the function between the first brace ({) and the first conditional statement, and after any declarations.

PREfast for Drivers uses these macros when #pragma alloc_text or #pragma code_seg is used to move a function into a pageable code section. The Code Analysis tool infers that a section is pageable when the section name begins with PAGE. For more information, see Warning C28170.